# Flip Bar Chart vertically

**URL:** <https://forum.inductiveautomation.com/t/flip-bar-chart-vertically/59860>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 20, 2022, 9:03pm UTC](https://forum.inductiveautomation.com/t/flip-bar-chart-vertically/59860 "2022-05-20T21:03:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamuelsenLarsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/samuelsenlarsen/32/11901_2.png) [@SamuelsenLarsen](https://forum.inductiveautomation.com/u/SamuelsenLarsen)\
**Post date:** [May 20, 2022, 9:03pm UTC](https://forum.inductiveautomation.com/t/flip-bar-chart-vertically/59860/1 "2022-05-20T21:03:18Z")

</div>

Hi,

I’m trying to create a vision window using a bar chart showing positive values from top moving downwards. I also want the axis label to be on the top, almost like flipping/mirror the chart vertically.

Does anyone now how to do something like this?

Hilsen Stian

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 21, 2022, 8:57pm UTC](https://forum.inductiveautomation.com/t/flip-bar-chart-vertically/59860/3 "2022-05-21T20:57:15Z")

</div>

I _think_ you can use a Vision chart set as category type, and rendered as a bar chart. You can use the chart customizer to move your axis and labels around. For the life of me i could not get the chart to work in category mode, i am sure i just missed something obvious though.

Edit:  
This forced me learn more about how charts work, and now i have a better answer! Yes you can, you just need to set the jfree axis to inverted and to change the domain axis location. I put this on a mouse click event just as a test.

```auto
from org.jfree.chart.axis import AxisLocation
event.source.getChart().getPlot().getRangeAxis().setInverted(True)
event.source.getChart().getPlot().setDomainAxisLocation(AxisLocation.TOP_OR_LEFT)

```

![V6r6zYLu7X](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/244efef229452e6d2aa67ced65e5a9eb8795a1b8.gif)

---

<div class="post-metadata">

**Author:** ![SamuelsenLarsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/samuelsenlarsen/32/11901_2.png) [@SamuelsenLarsen](https://forum.inductiveautomation.com/u/SamuelsenLarsen)\
**Post date:** [May 31, 2022, 8:27pm UTC](https://forum.inductiveautomation.com/t/flip-bar-chart-vertically/59860/4 "2022-05-31T20:27:25Z")

</div>

Thanks!

That was exactly what i was trying to achieve
