X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=2fd2c05ac202a8a392b3583e7c792b9571a3aba6;hb=16879a6b4e206378922de67c50f67a38193d5f53;hp=3a6018018f7fbc0921bd1e36423238ebb98547d5;hpb=debdb88d1ccca3648f45d6cc5d49896f3014cfdd;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 3a60180..2fd2c05 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2172,11 +2172,13 @@ Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) { for (i = num_series; i >= 1; i--) { if (!this.visibility()[i - 1]) continue; - // TODO(danvk): is this copy really necessary? - var series = rolledSeries[i]; // []; - // for (j = 0; j < rolledSeries[i].length; j++) { - // series.push(rolledSeries[i][j]); - // } + // Note: this copy _is_ necessary at the moment. + // If you remove it, it breaks zooming with error bars on. + // TODO(danvk): investigate further & write a test for this. + var series = []; + 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,