# Status Chart Y Axis

**URL:** <https://forum.inductiveautomation.com/t/status-chart-y-axis/38304>\
**Category:** Ignition\
**Created:** [September 2, 2020, 2:32pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304 "2020-09-02T14:32:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJVR](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@CJVR](https://forum.inductiveautomation.com/u/CJVR)\
**Post date:** [September 2, 2020, 2:32pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/1 "2020-09-02T14:32:17Z")

</div>

Is it possible to set the order of the y-Axis in the Status Chart when using the Tall Data Format? I was hoping the order in the dataset would do it but that did not work.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 2, 2020, 4:50pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/2 "2020-09-02T16:50:33Z")

</div>

Theoretically, it is possible, but I doubt that you are going to want to dig in that deep.

The Status Chart uses the natural ordering of the series names (in either mode). So 0-9 will always be below alpha numeric characters and alpha numeric characters will be sorted in alphabetical order from bottom to top (e.g. A will be below B, Line 0 will be below Line A, etc.)

This stems from the implementation of the [java.util.TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html). In theory you could implement your own extension of the StatusChartDataSet, honestly though I think this would be much more trouble than it’s worth.

---

<div class="post-metadata">

**Author:** ![CJVR](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@CJVR](https://forum.inductiveautomation.com/u/CJVR)\
**Post date:** [September 2, 2020, 5:02pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/3 "2020-09-02T17:02:22Z")

</div>

From every thing I have seen I would agree with you. But mine has two series and it is showing State **above** Mode. I may end up making two and putting one above the other. But that is a real hack…

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 2, 2020, 6:51pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/4 "2020-09-02T18:51:34Z")

</div>

Yes, as is expected. S comes **after** M so “Mode” would be **below** “State”. If you change “Mode” to “mode” it will move above State.

There really isn’t a very simple way, short of making multiple charts, to accomplish what you’re looking for.

At least not that I can find.

---

<div class="post-metadata">

**Author:** ![CJVR](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@CJVR](https://forum.inductiveautomation.com/u/CJVR)\
**Post date:** [September 2, 2020, 7:41pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/5 "2020-09-02T19:41:01Z")

</div>

So, it is in **reverse** alphabetical order?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/1/313eefc04281924a456dd2e8cdacb5b3c916f257.png)  
That does not make sense to me… But, @lrose, you are correct. The documentation also shows it in reverse alphabetical order. I will just leave it the way it is. Thanks.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 2, 2020, 8:24pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/6 "2020-09-02T20:24:10Z")

</div>

Well, I don’t know exactly how the inner workings handle this, but if you put the following script in the mouseClickedEvent on the chart.

```auto
print event.source.getChart().getPlot().dataset.getSeriesNames()

```

You will see that it will print out the following output:

```auto
array(java.lang.String, [u'Mode',u'State'])

```

Series names are added to the array in natural order, so Mode **before** State. I suspect that as the renderer loops through the list it grabs the items in index ascending order (e.g. starting at 0 as opposed to array.length - 1) , thus the series are added to the chart in natural order from bottom to top.

Additional Series are “stacked” on existing series rather than the existing series being pushed up.

This of course only applies to the “Tall” format, using the “Wide” format the series are added in the order of the Columns of the dataset. So if you add a column titled State, and then a column titled Mode, then Mode will be **above** State when rendered.

---

<div class="post-metadata">

**Author:** ![CJVR](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@CJVR](https://forum.inductiveautomation.com/u/CJVR)\
**Post date:** [September 2, 2020, 8:27pm UTC](https://forum.inductiveautomation.com/t/status-chart-y-axis/38304/7 "2020-09-02T20:27:27Z")

</div>

Wide will not work for me since the two datasets don’t really line up. I’ll leave it the way it is. Thanks for your help, @lrose.
