* indices are into the axes_ array.
*/
Dygraph.prototype.computeYAxes_ = function() {
- this.axes_ = [{}]; // always have at least one y-axis.
+ this.axes_ = [{ yAxisId: 0 }]; // always have at least one y-axis.
this.seriesToAxisMap_ = {};
// Get a list of series names.
var opts = {};
Dygraph.update(opts, this.axes_[0]);
Dygraph.update(opts, { valueRange: null }); // shouldn't inherit this.
+ var yAxisId = this.axes_.length;
+ opts.yAxisId = yAxisId;
Dygraph.update(opts, axis);
this.axes_.push(opts);
- this.seriesToAxisMap_[seriesName] = this.axes_.length - 1;
+ this.seriesToAxisMap_[seriesName] = yAxisId;
}
}