From 8c9cc4fae189433430968132e563789ee86c8c59 Mon Sep 17 00:00:00 2001 From: Suzana Pescador Date: Wed, 10 May 2017 19:02:35 +0100 Subject: [PATCH] [Bug] Coloring Background on siglestat panel #7242 (#8334) The bug was happening because the background color was being based on the rounded value (accounting the user defined decimals). Changed it to use the pure value (not the rounded) to follow whats being done in the value color, and also in the table thresholds (they don't consider the decimals when comparing to thresholds). --- public/app/plugins/panel/singlestat/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 406aedb3877..353786a1977 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -569,8 +569,8 @@ class SingleStatCtrl extends MetricsPanelCtrl { var body = panel.gauge.show ? '' : getBigValueHtml(); - if (panel.colorBackground && !isNaN(data.valueRounded)) { - var color = getColorForValue(data, data.valueRounded); + if (panel.colorBackground && !isNaN(data.value)) { + var color = getColorForValue(data, data.value); if (color) { $panelContainer.css('background-color', color); if (scope.fullscreen) {