Commit 7e27b6d2 authored by David Schnur's avatar David Schnur

Merge pull request #934 from NIA/threshold-fixes

flot.threshold: insert generated series after original, not in the end
parents 36bfcbf0 17ceb51d
...@@ -103,8 +103,11 @@ You may need to check for this in hover events. ...@@ -103,8 +103,11 @@ You may need to check for this in hover events.
datapoints.points = newpoints; datapoints.points = newpoints;
thresholded.datapoints.points = threspoints; thresholded.datapoints.points = threspoints;
if (thresholded.datapoints.points.length > 0) if (thresholded.datapoints.points.length > 0) {
plot.getData().push(thresholded); var origIndex = $.inArray(s, plot.getData());
// Insert newly-generated series right after original one (to prevent it from becoming top-most)
plot.getData().splice(origIndex + 1, 0, thresholded);
}
// FIXME: there are probably some edge cases left in bars // FIXME: there are probably some edge cases left in bars
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment