Remove double-call of treatMouseOpAsClick, and also pass event, which
[dygraphs.git] / dygraph-canvas.js
index 3f24b80..d6570d1 100644 (file)
@@ -70,7 +70,7 @@ DygraphLayout.prototype.setAnnotations = function(ann) {
       return;
     }
     Dygraph.update(a, ann[i]);
-    if (!a.xval) a.xval = parse(a.x);
+    if (!a.xval) a.xval = parse(a.x, this.dygraph_);
     this.annotations.push(a);
   }
 };
@@ -1039,7 +1039,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() {
           var isIsolated = (!prevX && (j == points.length - 1 ||
                                        !Dygraph.isOK(points[j+1].canvasy)));
 
-          if (!prevX) {
+          if (prevX === null) {
             prevX = point.canvasx;
             prevY = point.canvasy;
           } else {