From: Dan Vanderkam Date: Wed, 18 Jul 2012 22:07:00 +0000 (-0500) Subject: remove one deep copy; remove thick gridlines from demo X-Git-Tag: v1.0.0~220 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=0604287ee6cdbf6f4b0ec01b68a75f06953effda;p=dygraphs.git remove one deep copy; remove thick gridlines from demo --- 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 } );