X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Fgrid.js;h=06bfcd3c0020062079a6c06d0ae2b254ca919490;hb=34fc91d4b4fbc25094da3ed5fce35dc517d52eeb;hp=5d9b6c68b0b75b9925ba0161be17a5597fde9bc8;hpb=9e906ae6bedb3afb02015d18d0bc2a42d558aea6;p=dygraphs.git diff --git a/plugins/grid.js b/plugins/grid.js index 5d9b6c6..06bfcd3 100644 --- a/plugins/grid.js +++ b/plugins/grid.js @@ -52,9 +52,9 @@ grid.prototype.willDrawChart = function(e) { if (g.getOption('drawYGrid')) { var axes = ["y","y2"]; var strokeStyles = [], lineWidths = [], drawGrid = [], stroking = [], strokePattern =[]; - for(var index in axes){ + for(var index in axes) { drawGrid[index] = g.getOptionForAxis("drawGrid",axes[index]); - if(drawGrid[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]); @@ -66,7 +66,7 @@ grid.prototype.willDrawChart = function(e) { // draw grids for the differen axes for (i = 0; i < ticks.length; i++) { var axis = ticks[i][0]; - if(drawGrid[axis]){ + if(drawGrid[axis]) { if (stroking[axis]) { ctx.installPattern(strokePattern[axis]); } @@ -84,7 +84,7 @@ grid.prototype.willDrawChart = function(e) { if (stroking[axis]) { ctx.uninstallPattern(); } - } + } } ctx.restore(); } @@ -109,7 +109,7 @@ grid.prototype.willDrawChart = function(e) { ctx.stroke(); } if (stroking) { - ctx.uninstallPattern(); + ctx.uninstallPattern(); } ctx.restore(); }