X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;h=4a5ca44c9d5cabeb71f5423cb7019d9b82611270;hb=8ae015b50696f7cdbe20d2bec89cf9e9267738e3;hp=6c3a4116ccf2bda0a6b739200cd52ecc94cc1989;hpb=b477300e0a777d48c86618ec0db38ac834ac3249;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 6c3a411..4a5ca44 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -786,7 +786,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() { // and next points are null. var isIsolated = (!prevX && (j == points.length - 1 || isNullOrNaN(points[j+1].canvasy))); - if (prevX === null) { + if (prevX === null) { prevX = point.canvasx; prevY = point.canvasy; } else { @@ -807,12 +807,13 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() { ctx.stroke(); } } - if (drawPoints || isIsolated) { - ctx.beginPath(); - ctx.fillStyle = color; - ctx.arc(point.canvasx, point.canvasy, pointSize, - 0, 2 * Math.PI, false); - ctx.fill(); + + if (drawPoints || isIsolated) { + ctx.beginPath(); + ctx.fillStyle = color; + ctx.arc(point.canvasx, point.canvasy, pointSize, + 0, 2 * Math.PI, false); + ctx.fill(); } } }