Merge commit '9ac5e4aea125e706201c61b0ccb13a2cafe5618f' into clipping
authorDan Vanderkam <danvdk@gmail.com>
Sat, 20 Feb 2010 01:42:44 +0000 (17:42 -0800)
committerDan Vanderkam <danvdk@gmail.com>
Sat, 20 Feb 2010 01:42:44 +0000 (17:42 -0800)
dygraph-canvas.js
dygraph.js

index e4971c5..a1f848a 100644 (file)
@@ -85,9 +85,9 @@ DygraphLayout.prototype._evaluateLineCharts = function() {
       if (point.y >= 1.0) {
         point.y = 1.0;
       }
-      if ((point.x >= 0.0) && (point.x <= 1.0)) {
+      // if ((point.x >= 0.0) && (point.x <= 1.0)) {
         this.points.push(point);
-      }
+      // }
     }
   }
 };
index b009c77..ba2f31e 100644 (file)
@@ -408,9 +408,11 @@ Dygraph.prototype.destroy = function() {
  * @private
  */
 Dygraph.prototype.createPlotKitCanvas_ = function(canvas) {
-  // var h = document.createElement("canvas");
   var h = Dygraph.createCanvas();
   h.style.position = "absolute";
+  // TODO(danvk): h should be offset from canvas. canvas needs to include
+  // some extra area to make it easier to zoom in on the far left and far
+  // right. h needs to be precisely the plot area, so that clipping occurs.
   h.style.top = canvas.style.top;
   h.style.left = canvas.style.left;
   h.width = this.width_;
@@ -1378,9 +1380,9 @@ Dygraph.prototype.drawGraph_ = function(data) {
       var high= this.dateWindow_[1];
       var pruned = [];
       for (var k = 0; k < series.length; k++) {
-        if (series[k][0] >= low && series[k][0] <= high) {
+        // if (series[k][0] >= low && series[k][0] <= high) {
           pruned.push(series[k]);
-        }
+        // }
       }
       series = pruned;
     }