- var axes = ["y","y2"];
- var strokeStyles = [], lineWidths = [], drawGrid = [], stroking = [], strokePattern =[];
- for(var index in axes) {
- drawGrid[index] = g.getOptionForAxis("drawGrid",axes[index]);
- if(drawGrid[index]) {
- strokeStyles[index] = g.getOptionForAxis('gridLineColor',axes[index]);
- lineWidths[index] = g.getOptionForAxis('gridLineWidth',axes[index]);
- strokePattern[index] = g.getOptionForAxis('gridLinePattern',axes[index]);
- stroking[index] = strokePattern[index] && (strokePattern[index].length >= 2);
+ var axes = ["y", "y2"];
+ var strokeStyles = [], lineWidths = [], drawGrid = [], stroking = [], strokePattern = [];
+ for (var i = 0; i < axes.length; i++) {
+ drawGrid[i] = g.getOptionForAxis("drawGrid", axes[i]);
+ if (drawGrid[i]) {
+ strokeStyles[i] = g.getOptionForAxis('gridLineColor', axes[i]);
+ lineWidths[i] = g.getOptionForAxis('gridLineWidth', axes[i]);
+ strokePattern[i] = g.getOptionForAxis('gridLinePattern', axes[i]);
+ stroking[i] = strokePattern[i] && (strokePattern[i].length >= 2);