From 0604287ee6cdbf6f4b0ec01b68a75f06953effda Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 18 Jul 2012 17:07:00 -0500 Subject: [PATCH] remove one deep copy; remove thick gridlines from demo --- dygraph.js | 10 ++++++---- tests/demo.html | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dygraph.js b/dygraph.js index bd3a4cc..5e10d06 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2168,10 +2168,10 @@ Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) { if (!this.visibility()[i - 1]) continue; // TODO(danvk): is this copy really necessary? - var series = []; - for (j = 0; j < rolledSeries[i].length; j++) { - series.push(rolledSeries[i][j]); - } + var series = rolledSeries[i]; // []; + // for (j = 0; j < rolledSeries[i].length; j++) { + // series.push(rolledSeries[i][j]); + // } // Prune down to the desired range, if necessary (for zooming) // Because there can be lines going to points outside of the visible area, @@ -2634,10 +2634,12 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { * * This is where undesirable points (i.e. negative values on log scales and * missing values through which we wish to connect lines) are dropped. + * TODO(danvk): the "missing values" bit above doesn't seem right. * * @private */ Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) { + // TODO(danvk): pre-allocate series here. var series = []; for (var j = 0; j < rawData.length; j++) { var x = rawData[j][0]; diff --git a/tests/demo.html b/tests/demo.html index 94582dc..9184f4c 100644 --- a/tests/demo.html +++ b/tests/demo.html @@ -47,8 +47,7 @@ title: 'Interesting Shapes', xlabel: 'Date', ylabel: 'Count', - axisLineColor: 'white', - gridLineWidth: 10 + axisLineColor: 'white' // drawXGrid: false } ); -- 2.7.4