Commit 3c42fece by Torkel Ödegaard Committed by GitHub

Graph: follow-up graph decimals fix, #16414 (#16450)

parent 67cbc7d4
...@@ -1763,9 +1763,8 @@ Licensed under the MIT license. ...@@ -1763,9 +1763,8 @@ Licensed under the MIT license.
axis.delta = delta; axis.delta = delta;
axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec); axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
axis.tickSize = opts.tickSize || size; axis.tickSize = opts.tickSize || size;
// grafana addition // grafana addition
if (opts.tickDecimals === null && opts.tickDecimals === undefined) { if (opts.tickDecimals === null || opts.tickDecimals === undefined) {
axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10); axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment