Ignition Report Module. Bar Chart Multiple Axis configurations (scripting)

Hi Ignition community :slight_smile:
Having an issue with Bar Chart while developing report.
Is anyone configured, or scripted Bar Chart to add another axis to it ? (Y - one).
I tried to investigate in Bar Chart scripting but need some example of how I can play with it.
This JFreeChart object and methods for it something too complicated for me :slight_smile:

So i have data set with next header [Name, Value1, Value2]
Value2 can be much greater than Value1, and i want to show them on same bar chart. To do it properly i need add second Y axis, and 1 axis will be for Value 1 - another for Value 2.
But there are no interface of how to add axis for bar chart... (When XY and Timeseries chart has it).
So look like some scripting required to do so.

If anyone can help me with this task or some scripting example it will be really helpful for me.

Chart example:

	import org.jfree.chart.axis.NumberTickUnit as NTU
	from copy import deepcopy
	oldAxisNTU = NTU(500) # old Range Axis tick value
	modAxisNTU = NTU(50)  # newly defined Range axis tick value
	plot =  chart.plot.getRootPlot()
	oldAxis = plot.getRangeAxis()
	modAxis = deepcopy(oldAxis)
	oldAxis.setTickUnit(oldAxisNTU)
	modAxis.setTickUnit(modAxisNTU)
	plot.setRangeAxes([oldAxis,modAxis])

2 Likes

Thanks for the reply, it really helpful.
But in not clearly how to set required data set (value 1) to axis #0 and data set (value 2) to axis #1?