소스 검색

SinglestatPanel: increased scaled decimal offset by 2 for, improves decimal precision when units gets scaled, #1043, #951

Torkel Ödegaard 11 년 전
부모
커밋
9e26d3e85d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/app/panels/singlestat/module.js

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

@@ -158,7 +158,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
 
       var result = {};
       result.decimals = Math.max(0, dec);
-      result.scaledDecimals = result.decimals - Math.floor(Math.log(size) / Math.LN10);
+      result.scaledDecimals = result.decimals - Math.floor(Math.log(size) / Math.LN10) + 2;
 
       return result;
     };