# Adding second Y-axis to stacked bar graph

**URL:** <https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119>\
**Category:** Kibana\
**Created:** [June 8, 2020, 4:30am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119 "2020-06-08T04:30:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rgvr\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgvr_s/32/69872_2.png) [@Rgvr\_S](https://discuss.elastic.co/u/Rgvr_S)\
**Post date:** [June 8, 2020, 4:30am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/1 "2020-06-08T04:30:42Z")

</div>

I have a stacked bar graph made for the following data,  
 ![sample1](https://us1.discourse-cdn.com/elastic/original/3X/2/7/27e9157118f3144bfd1dcfeee755e146ab3d343c.png)  
The bar graph looks like this,

 ![sample2](https://us1.discourse-cdn.com/elastic/original/3X/4/7/476df5adb3aa75c936cb81045cb028e9c68bab70.png)  
I'd like to add another Y-axis to divide the graph based on months.  
How do I do this ?  
I use elasticsearch7.3.2 and kibana7.3.2

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 8, 2020, 7:18am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/2 "2020-06-08T07:18:52Z")

</div>

What exactly do you mean by "another Y-axis"? You could use a "Split series" bucket which uses a monthly date histogram to split all of the positions you have by month as well - `P001` will become `P001 January`, `P001 February`, `P001 March` and so on.

However as your chart is already really crowded it might make more sense to use a "Split chart" bucket and have a separate chart per month below each other.

---

<div class="post-metadata">

**Author:** ![Rgvr\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgvr_s/32/69872_2.png) [@Rgvr\_S](https://discuss.elastic.co/u/Rgvr_S)\
**Post date:** [June 8, 2020, 8:32am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/3 "2020-06-08T08:32:57Z")

</div>

What I wanted was the current graph split across different months, I think split chart would work, however my tool tip looks like this,

 ![sample3](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7ca6e7809a2eeb40af91b4269131291a5627660c.jpeg)  
Why is the month value like that and Is there a way to change the value that is shown ?  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 8, 2020, 8:43am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/4 "2020-06-08T08:43:19Z")

</div>

This is definitely a bug. I can't find the issue right now, but I just tested in the latest version and it doesn't happen there - upgrading your stack is probably the simplest solution.

---

<div class="post-metadata">

**Author:** ![Rgvr\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgvr_s/32/69872_2.png) [@Rgvr\_S](https://discuss.elastic.co/u/Rgvr_S)\
**Post date:** [June 9, 2020, 8:55am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/5 "2020-06-09T08:55:12Z")

</div>

I will try upgrading my stack and check. Thanks.

---

<div class="post-metadata">

**Author:** ![Rgvr\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgvr_s/32/69872_2.png) [@Rgvr\_S](https://discuss.elastic.co/u/Rgvr_S)\
**Post date:** [June 14, 2020, 1:56pm UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/6 "2020-06-14T13:56:04Z")

</div>

I upgraded my elasticsearch and kibana to 7.7.1 and this still happens. Could the problem be something else ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 15, 2020, 8:47am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/7 "2020-06-15T08:47:25Z")

</div>

Could you export your visualization and share the file here? Just to make sure I'm seeing the exact same thing as you./

---

<div class="post-metadata">

**Author:** ![Rgvr\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgvr_s/32/69872_2.png) [@Rgvr\_S](https://discuss.elastic.co/u/Rgvr_S)\
**Post date:** [June 17, 2020, 6:13am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/8 "2020-06-17T06:13:50Z")

</div>

Sure. This is the link to the NDJSON file of the visualization. [https://www.sendspace.com/file/s48ts3](https://www.sendspace.com/file/s48ts3)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 17, 2020, 7:52am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/9 "2020-06-17T07:52:58Z")

</div>

OK, I can reproduce now, thanks for the visualization. I didn't test with "Split chart", but with "Split series". This is definitely a bug, I reported it here: [https://github.com/elastic/kibana/issues/69364](https://github.com/elastic/kibana/issues/69364)

Till then using "split series" is probably your best option.

---

<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:** [July 15, 2020, 7:53am UTC](https://discuss.elastic.co/t/adding-second-y-axis-to-stacked-bar-graph/236119/10 "2020-07-15T07:53:01Z")

</div>

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