Fix bug 174. This is pulled from
authorRobert Konigsberg <konigsberg@google.com>
Tue, 26 Apr 2011 19:01:38 +0000 (15:01 -0400)
committerRobert Konigsberg <konigsberg@google.com>
Tue, 26 Apr 2011 19:01:38 +0000 (15:01 -0400)
https://github.com/nealie/dygraphs/commit/d61581e981c0d8e9415e9950c330898b209753cb
and if I knew how to pull that into my repo I'd do just that.

dygraph.js

index ae1faba..f019f23 100644 (file)
@@ -2619,15 +2619,6 @@ Dygraph.prototype.drawGraph_ = function() {
  *   indices are into the axes_ array.
  */
 Dygraph.prototype.computeYAxes_ = function() {
-  var valueWindows;
-  if (this.axes_ != undefined) {
-    // Preserve valueWindow settings.
-    valueWindows = [];
-    for (var index = 0; index < this.axes_.length; index++) {
-      valueWindows.push(this.axes_[index].valueWindow);
-    }
-  }
-
   this.axes_ = [{ yAxisId : 0, g : this }];  // always have at least one y-axis.
   this.seriesToAxisMap_ = {};
 
@@ -2704,13 +2695,6 @@ Dygraph.prototype.computeYAxes_ = function() {
     if (vis[i - 1]) seriesToAxisFiltered[s] = this.seriesToAxisMap_[s];
   }
   this.seriesToAxisMap_ = seriesToAxisFiltered;
-
-  if (valueWindows != undefined) {
-    // Restore valueWindow settings.
-    for (var index = 0; index < valueWindows.length; index++) {
-      this.axes_[index].valueWindow = valueWindows[index];
-    }
-  }
 };
 
 /**