Unverified Commit dd9cbcee authored by Palash's avatar Palash Committed by GitHub
Browse files

fix: decimal-precision is made undefined (#1344)

Co-authored-by: default avatarPrashant Shahi <prashant@signoz.io>
parent 897728cc
Showing with 3 additions and 7 deletions
+3 -7
......@@ -7,17 +7,13 @@ export const getYAxisFormattedValue = (
let decimalPrecision: number | undefined;
const parsedValue = getValueFormat(format)(
parseFloat(value),
12,
12,
undefined,
undefined,
undefined,
);
try {
const decimalSplitted = parsedValue.text.split('.');
if (
decimalSplitted.length === 1 ||
parseFloat(parsedValue.text) === parseInt(parsedValue.text, 10)
) {
if (decimalSplitted.length === 1) {
decimalPrecision = 0;
} else {
const decimalDigits = decimalSplitted[1].split('');
......
Supports Markdown
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