# Bar chart - value axis text formatting

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164>\
**Category:** Ignition\
**Created:** [April 5, 2013, 5:45am UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164 "2013-04-05T05:45:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat.stave](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pat.stave](https://forum.inductiveautomation.com/u/pat.stave)\
**Post date:** [April 5, 2013, 5:45am UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/1 "2013-04-05T05:45:41Z")

</div>

I have created a simple histogram of machine fault codes from a bar chart.  
The values of the faults are incremented by “1” when a fault occurs.

How can i format the text of the value axis ticks so that it will not display decimal points?  
Now the value axis displays “0,00 0,25 0,50 0,75 1,00…” but i want it to display “0 1 2 3 4 5 6…”  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8a69d79d0e89bbbd7daf5b8ae01f5d878dedc209.PNG)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 5, 2013, 4:18pm UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/2 "2013-04-05T16:18:41Z")

</div>

No, you don’t have control over formatting. You can try turning off value axis auto-range property and set the upper and lower bounds.

---

<div class="post-metadata">

**Author:** ![everardohr](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@everardohr](https://forum.inductiveautomation.com/u/everardohr)\
**Post date:** [July 28, 2013, 2:38am UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/3 "2013-07-28T02:38:40Z")

</div>

Is this still not possible for 7.6 version of Ignition?  
I am trying to set the number of vertical ticks and it seems that the amount is fixed. I found that if you change the Font size of the Tick Label then you have a fewer ticks, but this is not a very robust solution.

Thanks.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [August 12, 2013, 9:42pm UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/4 "2013-08-12T21:42:26Z")

</div>

I know this is a bit of a work-around, but have you tried hiding the axis by putting a linear scale over it? You have much more control over the tick mark spacing on a linear scale component.

---

<div class="post-metadata">

**Author:** ![martinezraul](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@martinezraul](https://forum.inductiveautomation.com/u/martinezraul)\
**Post date:** [December 6, 2017, 5:42pm UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/5 "2017-12-06T17:42:45Z")

</div>

Is there a better way to do this in 7.9 now?

---

<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:** [December 7, 2017, 2:10pm UTC](https://forum.inductiveautomation.com/t/bar-chart-value-axis-text-formatting/6164/6 "2017-12-07T14:10:51Z")

</div>

```auto
	from org.jfree.chart.axis import NumberAxis
	
	plot = chart.getPlot()
	axis = plot.getRangeAxis()

	axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits())

```
