소스 검색

Graph: Allow override decimals to fully override (#16414)

Override decimals did not fully override auto scaling logic

Fixes #16068
Torkel Ödegaard 6 년 전
부모
커밋
6ef35f0a8e
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      public/vendor/flot/jquery.flot.js

+ 4 - 1
public/vendor/flot/jquery.flot.js

@@ -1763,8 +1763,11 @@ Licensed under the MIT license.
             axis.delta = delta;
             axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
             axis.tickSize = opts.tickSize || size;
+
             // grafana addition
-            axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10);
+            if (opts.tickDecimals === null && opts.tickDecimals === undefined) {
+              axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10);
+            }
 
             // Time mode was moved to a plug-in in 0.8, and since so many people use it
             // we'll add an especially friendly reminder to make sure they included it.