Fix for issue 274: broken step plots
authorwimme <wim@wimme.net>
Fri, 17 Feb 2012 10:52:40 +0000 (11:52 +0100)
committerwimme <wim@wimme.net>
Fri, 17 Feb 2012 10:52:40 +0000 (11:52 +0100)
dygraph-canvas.js

index 9b2be25..9c2e4da 100644 (file)
@@ -875,6 +875,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() {
             ctx.lineWidth = strokeWidth;
             if (stepPlot) {
               this._dashedLine(ctx, prevX, prevY, point.canvasx, prevY, strokePattern);
+              prevX = point.canvasx;
             }
             this._dashedLine(ctx, prevX, prevY, point.canvasx, point.canvasy, strokePattern);
             prevX = point.canvasx;