Bar chart formatting in report

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

This confuses me because in the JFreeChart docs (here) BarRenderer inherits the method I’m trying to call from its parent class.

Here’s the script.

	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

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

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)