# Horizontal bar chart label location

**URL:** <https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [January 20, 2020, 2:23pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749 "2020-01-20T14:23:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fraeco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fraeco/32/61056_2.png) [@Fraeco](https://discuss.elastic.co/u/Fraeco)\
**Post date:** [January 20, 2020, 2:23pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/1 "2020-01-20T14:23:16Z")

</div>

Is there a way to change the location of the Y-axis label used by the Horizontal Bar Chart?  
I'm struggling to get a proper layout because of variable lenght labels, and it's eating up a lot of whitespace as well.

Example of the desired result. Just the location of the labels 🙂 The rest is less important.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/e/dec8e580cd8d74d5f0619e653e7ec01bb88059f0.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [January 20, 2020, 3:47pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/2 "2020-01-20T15:47:54Z")

</div>

Hi @Fraeco,

Looking at the code of this chart I don't see any way to specify for `y` axis position anything but `left` and `right` unfortunately.

Best,  
Oleg

---

<div class="post-metadata">

**Author:** ![Fraeco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fraeco/32/61056_2.png) [@Fraeco](https://discuss.elastic.co/u/Fraeco)\
**Post date:** [January 21, 2020, 12:02pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/3 "2020-01-21T12:02:24Z")

</div>

Hey @azasypkin,

Thanks for getting back to me so quickly.  
I'm ultimatly looking for a way to align the labels of several charts on a canvas and get the general feel a bit more consistent.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2480faec2f73d3ec5bddb5845fb6a73fc40a3f4.png)

Is there a way to get the label part, and the graph part to a fixed % widht of the chart? Having a line break is less distracting then charts jumping all over the place.

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [January 21, 2020, 1:40pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/4 "2020-01-21T13:40:04Z")

</div>

I see, hmmm you can probably play with custom CSS, I see you can find selector for the axis container and its content. Obviously it's considered as a hack mostly since you'd need to use `!important` directive and such, but if you're curious:

 ![Peek 2020-01-21 14-37](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8ead36b3c497d360f830f3fc6a30005cae826808.gif)

Best,  
Oleg

---

<div class="post-metadata">

**Author:** ![Fraeco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fraeco/32/61056_2.png) [@Fraeco](https://discuss.elastic.co/u/Fraeco)\
**Post date:** [January 21, 2020, 2:57pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/5 "2020-01-21T14:57:53Z")

</div>

Will have a look at fighting with the CSS.

Thanks again for the feedback!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2020, 2:57pm UTC](https://discuss.elastic.co/t/horizontal-bar-chart-label-location/215749/6 "2020-02-18T14:57:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
