* indices are into the axes_ array.
*/
Dygraph.prototype.computeYAxes_ = function() {
- this.axes_ = [{}]; // always have at least one y-axis.
+ 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 }]; // always have at least one y-axis.
this.seriesToAxisMap_ = {};
// Get a list of series names.