From 9ac5e4aea125e706201c61b0ccb13a2cafe5618f Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 10 Feb 2010 09:55:00 -0800 Subject: [PATCH] notes; stop clipping --- dygraph-canvas.js | 4 ++-- dygraph.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 70998bd..45c02ff 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -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); - } + // } } } }; diff --git a/dygraph.js b/dygraph.js index dfd3f2f..f8ca478 100644 --- a/dygraph.js +++ b/dygraph.js @@ -360,9 +360,11 @@ Dygraph.prototype.createInterface_ = 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_; @@ -1326,9 +1328,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; } -- 2.7.4