Add var declaration to prevent breaking stacked graphs.
authorRobert Konigsberg <konigsberg@google.com>
Wed, 21 Dec 2011 18:45:22 +0000 (13:45 -0500)
committerRobert Konigsberg <konigsberg@google.com>
Wed, 21 Dec 2011 18:45:22 +0000 (13:45 -0500)
dygraph-canvas.js

index 77d8cc4..b184717 100644 (file)
@@ -743,7 +743,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() {
           }
           var newYs;
           if (stackedGraph) {
-            lastY = baseline[point.canvasx];
+            var lastY = baseline[point.canvasx];
             if (lastY === undefined) lastY = axisY;
             baseline[point.canvasx] = point.canvasy;
             newYs = [ point.canvasy, lastY ];