How can I get this chart customizer property for scripting? I need toggle this property to execute my idea. Can someone help me?
1 Like
For the default axis, this should work:
#chartComponent = event.source.parent.getComponent('Chart') #Relative path to chart
chartComponent.chart.plot.domainAxis.visible = False
#or
chartComponent.chart.plot.domainAxis.visible = True
1 Like
If you need a specific axis, this approach works:
chartComponent = event.source.parent.getComponent('Chart')
plot = chartComponent.chart.plot
for axisIndex in range(plot.domainAxisCount):
axis = plot.getDomainAxis(axisIndex)
if plot.getDomainAxis(axisIndex).label == 'Date':#or whichever one you are after
axis.visible = False
#or
#axis.visible = True
2 Likes
How can I call the y axis instead?
Simple
The code word for y is range, so it will be rangeAxis instead of domainAxis
1 Like