change the color of grid plot -dojo
i am using th开发者_如何学Cis code:
chart1.addPlot("grid", {
type: "Grid",
hMinorLines: true
});
how i can change the color of the grid, and the interval between each line ? It is possible, right?
thanks
The Grid's intervals between lines are determined by the tick step parameters you give to the axis. So if you want major horizontal lines/ticks for every integer, and minor horizontal lines for every .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 of 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);
精彩评论