# Vision Bar Graph Axis Formatting

**URL:** <https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 10, 2021, 5:10pm UTC](https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928 "2021-11-10T17:10:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erines](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/erines/32/27381_2.png) [@erines](https://forum.inductiveautomation.com/u/erines)\
**Post date:** [November 10, 2021, 5:10pm UTC](https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928/1 "2021-11-10T17:10:40Z")

</div>

Is there a way to format the vertical count axis on the Bar Graph chart? I have a dataset that will only include whole numbers. I want the vertical part count to also only show whole numbers.

 ![2021-11-10 12_09_49-Edge - J21038 - Sig Universal - Ignition Designer](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a2f8b9b72ec7d7b6902e102c89ab6b6eb8101fa2.png)

---

<div class="post-metadata">

**Author:** ![erines](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/erines/32/27381_2.png) [@erines](https://forum.inductiveautomation.com/u/erines)\
**Post date:** [November 10, 2021, 7:37pm UTC](https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928/2 "2021-11-10T19:37:04Z")

</div>

I was able to temporarily set the range static from 0 to 100 which temporarily solved the issue but I would like to learn how to do this incase the axis needs to be dynamic.

---

<div class="post-metadata">

**Author:** ![Jakub\_R](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Jakub\_R](https://forum.inductiveautomation.com/u/Jakub_R)\
**Post date:** [November 12, 2025, 11:34am UTC](https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928/3 "2025-11-12T11:34:52Z")

</div>

> [@erines](#):
>
> Is there a way to format the vertical count axis on the Bar Graph chart? I have a dataset that will only include whole numbers.

If anyone needs it and for some reason is stuck on Ignition 7.9 like me, this code on propertyChange event works:

```python
from org.jfree.chart.axis import NumberAxis

chart = event.source.chart

if chart is not None:
plot = chart.getPlot()
rangeAxis = plot.getRangeAxis()

if isinstance(rangeAxis, NumberAxis):
	rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits())

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 12, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/vision-bar-graph-axis-formatting/52928/4 "2025-11-12T13:09:42Z")

</div>

> [@Jakub\_R](#):
>
> this code on propertyChange event

That is a **dangerous** piece of code for a propertyChange event, as you are not testing the event's propertyName. Which will cause this code to be executed many, many times, likely with future disruptions.
