projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e7f8af
)
Changed code to separate graph stacking logic by axis.
author
Jason John Sayers
<JasonJSayers@gmail.com>
Tue, 30 Sep 2014 14:00:23 +0000
(09:00 -0500)
committer
Dan Vanderkam
<danvdk@gmail.com>
Tue, 4 Nov 2014 22:20:16 +0000
(17:20 -0500)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
2d1e4c9
..
735c99a
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-2543,6
+2543,7
@@
Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) {
var extremes = {}; // series name -> [low, high]
var seriesIdx, sampleIdx;
var firstIdx, lastIdx;
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.
// Loop over the fields (series). Go from the last to the first,
// because if they're stacked that's how we accumulate the values.
@@
-2613,7
+2614,11
@@
Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) {
seriesName, boundaryIds[seriesIdx-1][0]);
if (this.getBooleanOption("stackedGraph")) {
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"));
}
this.getBooleanOption("stackedGraphNaNFill"));
}