fix(singlestat): use exact value for coloring

closes #4259
This commit is contained in:
bergquist 2016-03-16 16:03:24 +01:00
parent fcaf2bfdba
commit 57ecb276c8
2 changed files with 1 additions and 3 deletions

View File

@ -279,7 +279,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
if (panel.prefix) { body += getSpan('singlestat-panel-prefix', panel.prefixFontSize, panel.prefix); }
var value = applyColoringThresholds(data.valueRounded, data.valueFormated);
var value = applyColoringThresholds(data.value, data.valueFormated);
body += getSpan('singlestat-panel-value', panel.valueFontSize, value);
if (panel.postfix) { body += getSpan('singlestat-panel-postfix', panel.postfixFontSize, panel.postfix); }

View File

@ -24,8 +24,6 @@ describe('grafanaSingleStat', function() {
});
});
describe('negative thresholds', () => {
var data: any = {
colorMap: ['green', 'yellow', 'red'],