From 2bb85d216e5bb085f6d1dde2ceb7e48d899254e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 13 Apr 2015 09:05:42 +0200 Subject: [PATCH] Fixed fixed decimal option bug, when fixed decimal value was set to zero, Fixes #1764 --- public/app/panels/graph/graph.js | 2 +- public/app/panels/singlestat/module.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/panels/graph/graph.js b/public/app/panels/graph/graph.js index 5e8bcb2d964..3749807e2ee 100755 --- a/public/app/panels/graph/graph.js +++ b/public/app/panels/graph/graph.js @@ -115,7 +115,7 @@ function (angular, $, kbn, moment, _, GraphTooltip) { var formater = kbn.valueFormats[scope.panel.y_formats[series.yaxis - 1]]; // decimal override - if (scope.panel.decimals) { + if (_.isNumber(scope.panel.decimals)) { series.updateLegendValues(formater, scope.panel.decimals, null); } else { // auto decimals diff --git a/public/app/panels/singlestat/module.js b/public/app/panels/singlestat/module.js index 302fe30d3f5..a43ac2d0b69 100644 --- a/public/app/panels/singlestat/module.js +++ b/public/app/panels/singlestat/module.js @@ -129,7 +129,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) { }; $scope.getDecimalsForValue = function(value) { - if ($scope.panel.decimals) { + if (_.isNumber($scope.panel.decimals)) { return { decimals: $scope.panel.decimals, scaledDecimals: null }; }