Easy Chart Y axis label orientation


Is it possible in ignition vision to change Y axis label orientation of easy chart?

I'd like it to be horizontal rather than vertical since they run into each other when I get a lot of subplots:

Thank you!

This can be done with scripting using the configureChart extension function.


def configureChart(self, chart):
	# Needed to convert the more intuitive degrees into the required radians
	# ...This could probably also be done close enough without the import using angle * (3.14/180)
	from java.lang import Math
	# Check to see if subplots are being used (CombinedDomainXYPlot)
	if hasattr(chart.plot, 'subplots'):
		# Iterate through all of the range axes for each subplot and set the label angle to 45 degrees
		for plot in chart.plot.subplots:
			for axis in xrange(plot.rangeAxisCount):
	else: # (AutoAnnotateXYPlot)
		# Iterate through each range axis of the default ploy rotate all labels 45 degrees
		# ...if there are any axis on the right side, the angle will have to be 225 [45 + 180] to orientate right side up
		for axis in xrange(chart.plot.rangeAxisCount):


Edit: The original code assumed the implementation of subplots based upon the OP's picture. Updated the code, so it will work whether or not subplots are being used.

1 Like