# Fix x-axis for a stacked bar chart

**URL:** <https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216>\
**Category:** Kibana\
**Created:** [July 8, 2021, 8:06pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216 "2021-07-08T20:06:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANKITA\_SAHA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_saha/32/91152_2.png) [@ANKITA\_SAHA](https://discuss.elastic.co/u/ANKITA_SAHA)\
**Post date:** [July 8, 2021, 8:06pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216/1 "2021-07-08T20:06:02Z")

</div>

How can I fix my x-axis for a stacked bar chart?

please help! i use kibana 7.13.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:** [July 9, 2021, 2:35pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216/2 "2021-07-09T14:35:19Z")

</div>

Hey, can you provide more context to your question? What does "fixing" mean? How does it look right now and how should it look?

---

<div class="post-metadata">

**Author:** ![ANKITA\_SAHA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_saha/32/91152_2.png) [@ANKITA\_SAHA](https://discuss.elastic.co/u/ANKITA_SAHA)\
**Post date:** [July 9, 2021, 4:28pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216/3 "2021-07-09T16:28:50Z")

</div>

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

⬆ this is how my current visualization looks like.  
Here I have no.of errors generated in y axis and the time they were generated in x-axis.There are 3 types of errors i.e type A,type B,type C. Now when i apply a filter my other values in x-axis gets filtered out and it gets zoomed in. Something like this ⬇

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/0/70c30495f93d3a0e0fa6b13b9c0ac2a78f6874dd.png)

Now my requirement is I need my x-axis to be static .I want my x-axis marks to be there always.I require a visualization just like ds ⬇

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

By **fixing** i mean **'static'**.

---

<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:** [July 14, 2021, 12:09pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216/4 "2021-07-14T12:09:44Z")

</div>

As mentioned in the other post, you have to use the "filters" function for the x axis dimension, specifying the filter for each bar separately. Then they will continue to be displayed even if there is no data.

---

<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:** [August 11, 2021, 12:10pm UTC](https://discuss.elastic.co/t/fix-x-axis-for-a-stacked-bar-chart/278216/5 "2021-08-11T12:10:10Z")

</div>

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