瀏覽代碼

Singlestat: fixed decimal issue when value was 1, Fixes #1066

Torkel Ödegaard 11 年之前
父節點
當前提交
bde138177d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/app/panels/singlestat/module.js

+ 1 - 1
src/app/panels/singlestat/module.js

@@ -125,7 +125,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
 
 
     $scope.getDecimalsForValue = function(value) {
     $scope.getDecimalsForValue = function(value) {
       var opts = {};
       var opts = {};
-      if (value === 0) {
+      if (value === 0 || value === 1) {
         return { decimals: 0, scaledDecimals: 0 };
         return { decimals: 0, scaledDecimals: 0 };
       }
       }