Change grid color - dojo

I am using this code:

chart1.addPlot("grid", { type: "Grid", hMinorLines: true }); 

How can I change the grid color and the spacing between each row? Perhaps right?

thanks

enter image description here

+4
source share
1 answer

The grid spacing between the lines is determined by the step parameters that you give the axis. Therefore, if you need basic horizontal lines / ticks for each integer and small horizontal lines for each 0.25, you can do:

 chart1.addAxis("y", { ... majorTickStep: 1, minorTickStep: 0.25 }); 

To change the color of the grid lines, the only way I know is to manipulate the theme you are using.

 var myTheme = dojox.charting.themes.PlotKit.blue; // Or any other theme myTheme.axis.majorTick.color = "green"; myTheme.axis.minorTick.color = "red"; chart1.setTheme(myTheme); 
+3
source

All Articles