var extremes = {}; // series name -> [low, high]
var seriesIdx, sampleIdx;
var firstIdx, lastIdx;
+ var axisIdx;
// Loop over the fields (series). Go from the last to the first,
// because if they're stacked that's how we accumulate the values.
seriesName, boundaryIds[seriesIdx-1][0]);
if (this.getBooleanOption("stackedGraph")) {
- Dygraph.stackPoints_(seriesPoints, cumulativeYval, seriesExtremes,
+ axisIdx = this.attributes_.axisForSeries(seriesName);
+ if (cumulativeYval[axisIdx] === undefined) {
+ cumulativeYval[axisIdx] = [];
+ }
+ Dygraph.stackPoints_(seriesPoints, cumulativeYval[axisIdx], seriesExtremes,
this.getBooleanOption("stackedGraphNaNFill"));
}