From 74912dca8d48298eb5783d46bd4c0de641d39567 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 13 Sep 2018 15:41:49 -0700 Subject: [PATCH] Fix gauge display accuracy for "percent (0.0-1.0)" The "Decimals" value was incorrectly applied to the metric value used to calculate the gauge display in addition to the text value (so a "Decimals" value of "1" turns "45.1%" into "50%" in the gauge display even though the label still correctly says "45.1%"). --- public/app/plugins/panel/singlestat/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index c44b09449be..eafa3cf23f4 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -544,7 +544,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { elem.append(plotCanvas); const plotSeries = { - data: [[0, data.valueRounded]], + data: [[0, data.value]], }; $.plot(plotCanvas, [plotSeries], options);