X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Frange-selector.js;h=c9a635ce97f62da8a925ae9709b65c22135ba176;hb=c0430a23fa1a263cf3ee2d436da235fd5829d0a3;hp=d226ebafd05c4f8d64ac0bd620d089005eca89cb;hpb=db6a9f5a2c20a8ca30656b8c6dfc929d137edef4;p=dygraphs.git diff --git a/plugins/range-selector.js b/plugins/range-selector.js index d226eba..c9a635c 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -649,7 +649,6 @@ rangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() { // Create a combined series (average of all series values). var i, j; - var xVal, yVal; // TODO(danvk): short-circuit if there's only one series. var rolledSeries = []; @@ -681,7 +680,7 @@ rangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() { var yMin = Number.MAX_VALUE; var yMax = -Number.MAX_VALUE; for (i = 0; i < combinedSeries.length; i++) { - yVal = combinedSeries[i][1]; + var yVal = combinedSeries[i][1]; if (yVal !== null && isFinite(yVal) && (!logscale || yVal > 0)) { yMin = Math.min(yMin, yVal); yMax = Math.max(yMax, yVal);