# Contrariwise Chart's X axis

**URL:** <https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [October 22, 2018, 8:42am UTC](https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293 "2018-10-22T08:42:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.bertulli](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@c.bertulli](https://forum.inductiveautomation.com/u/c.bertulli)\
**Post date:** [October 22, 2018, 8:42am UTC](https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293/1 "2018-10-22T08:42:03Z")

</div>

Hi All,

Is there a way to have a contrariwise Chart’s X axis?  
I have two charts. One is displaying the rise of a variable ( from 0 to 50 degrees ) and the other chart should display the fall of the same variable ( from 50 to 0 degrees ) but I can’t find a clean way to reverse the X axis in order to have it from 50 to 0.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 22, 2018, 5:29pm UTC](https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293/2 "2018-10-22T17:29:14Z")

</div>

You can do this with a category chart. The labels are then in order they appear in the dataset.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/727160e2cfb2f7501547ce3c3636106be73e1225.png)

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [October 23, 2018, 5:11am UTC](https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293/3 "2018-10-23T05:11:31Z")

</div>

In the configureChart do the following:

```auto
plot =chart.getPlot()

domainAxis = plot.getDomainAxis()
domainAxis.setInverted(True)

```

---

<div class="post-metadata">

**Author:** ![c.bertulli](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@c.bertulli](https://forum.inductiveautomation.com/u/c.bertulli)\
**Post date:** [October 23, 2018, 6:34am UTC](https://forum.inductiveautomation.com/t/contrariwise-charts-x-axis/20293/4 "2018-10-23T06:34:11Z")

</div>

Thaaaankksssss!!!  
It worked like a charm! 😍
