# Bar chart formatting in report

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-formatting-in-report/37927>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [August 19, 2020, 7:10pm UTC](https://forum.inductiveautomation.com/t/bar-chart-formatting-in-report/37927 "2020-08-19T19:10:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 19, 2020, 7:10pm UTC](https://forum.inductiveautomation.com/t/bar-chart-formatting-in-report/37927/1 "2020-08-19T19:10:44Z")

</div>

When I run a configuration script on a chart in reporting I get this error.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e5cb553e7b15331195703b1cdb38ae1268044e73.png)

This confuses me because in the JFreeChart docs ([here](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/renderer/category/BarRenderer.html)) BarRenderer inherits the method I’m trying to call from its parent class.

Here’s the script.

```auto
	from java.text import NumberFormat
	from org.jfree.chart.labels import StandardCategoryItemLabelGenerator
	NF = NumberFormat.getInstance()
	NF.setMaximumFractionDigits(1)
	SCILG = StandardCategoryItemLabelGenerator('##0.0',NF)
	p = chart.getCategoryPlot()
	r = p.getRenderer()
	r.setDefaultItemLabelGenerator(SCILG)

```

Given my relative uselessness at this sort of thing, I expected that I was doing it wrong, but I can’t figure out why this particular error is showing up, especially in light of the documentation which seems to say the opposite thing.

Can anybody point me in the right direction?

Ignition 8.0.10

Thanks

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 19, 2020, 9:43pm UTC](https://forum.inductiveautomation.com/t/bar-chart-formatting-in-report/37927/2 "2020-08-19T21:43:23Z")

</div>

This worked for what I wanted. I must have been looking at the wrong version of documentation or something.

```auto
from java.text import NumberFormat
from org.jfree.chart.labels import StandardCategoryItemLabelGenerator
NF = NumberFormat.getInstance()
NF.setMaximumFractionDigits(1)
NF.setMinimumFractionDigits(1)
SCILG = StandardCategoryItemLabelGenerator(StandardCategoryItemLabelGenerator.DEFAULT_LABEL_FORMAT_STRING,NF)
p = chart.getCategoryPlot()
r = p.getRenderer()
r.setBaseItemLabelGenerator(SCILG)

```
