Commit 7194e91d by Torkel Ödegaard

Singlestat: small fix for threshold evalutations, use greater or equal for…

Singlestat: small fix for threshold evalutations, use greater or equal for threshold checks, Fixes #1192
parent 69d56b8e
......@@ -173,8 +173,8 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
}
else {
var series = $scope.series[0];
data.mainValue = series.stats[$scope.panel.valueName];
data.mainValueFormated = $scope.getFormatedValue(data.mainValue);
data.mainValue = 0;
data.mainValueFormated = '0';
data.flotpairs = series.flotpairs;
}
......
......@@ -55,7 +55,7 @@ function (angular, app, _, $) {
function getColorForValue(value) {
for (var i = data.thresholds.length - 1; i >= 0 ; i--) {
if (value > data.thresholds[i]) {
if (value >= data.thresholds[i]) {
return data.colorMap[i];
}
}
......
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