Chart Grid Color

I’ve been trying to do something that I thought it was going to be pretty easy, but apparently it is not. I need to “dissapear” the grid lines in a Chart component. The thing is that I haven’t been able to figure out how. I’ve tried to change the grid lines color to match the background (white) but can’t find that option. So far the only thing I have been able to do is to turn the chart background to the same color than the grid lines, but since I will be printing the graph, doesn’t work that well. Does anyone know how to “disable” or change color on the chart grid lines?




Welcome to the forum.

Both the Chart and Easy Chart have scripting extension functions for configuring the charts.

Right click the chart and select scripting, find extension functions and then select “configureChart”

check the enabled tick box and past the script below, (where it says [color=#0000FF]#put your code here[/color])

chart.getPlot().setDomainGridlinesVisible(0); chart.getPlot().setRangeGridlinesVisible(0);

make sure its all indented, it should do what you want.
The purple text you can see in the script is from Ignition and tells you where to go to get info on modifying the chart.


Thanks a lot! It worked fine! Where can I find all the scripting configuration options for the chart?



See class documentation here

here is my configureChart(self,chart) code example

plot = chart.getPlot()

1 Like