Commit bf9c0bb9 by Torkel Ödegaard

Merge pull request #76 from axe-felix/patch-1

added support for 'less is worse' thresholds
parents 775c0ff2 86695990
......@@ -141,7 +141,12 @@ function (angular, $, kbn, moment, _) {
});
if (panel.grid.threshold2) {
var limit2 = panel.grid.thresholdLine ? panel.grid.threshold2 : null;
var limit2;
if (panel.grid.thresholdLine) {
limit2 = panel.grid.threshold2;
} else {
limit2 = panel.grid.threshold1 > panel.grid.threshold2 ? -Infinity : +Infinity;
}
options.grid.markings.push({
yaxis: { from: panel.grid.threshold2, to: limit2 },
color: panel.grid.threshold2Color
......@@ -340,4 +345,4 @@ function (angular, $, kbn, moment, _) {
};
});
});
\ No newline at end of file
});
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