X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;h=50ff4865b6e9ddf85711c913f7f547091c781a5d;hb=cbe41be103cc129ff2477a872cb802538aafb3d3;hp=d100269df7b6032ed1b8fe314bf3d7a77268470f;hpb=4937e43755e104ae539052035fd94019c2788385;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index d100269..50ff486 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -172,43 +172,6 @@ DygraphCanvasRenderer.prototype.render = function() { this.attr_('underlayCallback')(ctx, this.area, this.dygraph_, this.dygraph_); } - var x, y, i, ticks; - if (this.attr_('drawYGrid')) { - ticks = this.layout.yticks; - ctx.save(); - ctx.strokeStyle = this.attr_('gridLineColor'); - ctx.lineWidth = this.attr_('gridLineWidth'); - for (i = 0; i < ticks.length; i++) { - // TODO(danvk): allow secondary axes to draw a grid, too. - if (ticks[i][0] !== 0) continue; - x = halfUp(this.area.x); - y = halfDown(this.area.y + ticks[i][1] * this.area.h); - ctx.beginPath(); - ctx.moveTo(x, y); - ctx.lineTo(x + this.area.w, y); - ctx.closePath(); - ctx.stroke(); - } - ctx.restore(); - } - - if (this.attr_('drawXGrid')) { - ticks = this.layout.xticks; - ctx.save(); - ctx.strokeStyle = this.attr_('gridLineColor'); - ctx.lineWidth = this.attr_('gridLineWidth'); - for (i=0; i