Commit 57ecb276 by bergquist

fix(singlestat): use exact value for coloring

closes #4259
parent fcaf2bfd
......@@ -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); }
......
......@@ -24,8 +24,6 @@ describe('grafanaSingleStat', function() {
});
});
describe('negative thresholds', () => {
var data: any = {
colorMap: ['green', 'yellow', 'red'],
......
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