mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 20:29:04 +08:00
fix: decimal-precision is made undefined (#1344)
Co-authored-by: Prashant Shahi <prashant@signoz.io>
This commit is contained in:
parent
897728cc71
commit
dd9cbcee33
@ -7,17 +7,13 @@ export const getYAxisFormattedValue = (
|
|||||||
let decimalPrecision: number | undefined;
|
let decimalPrecision: number | undefined;
|
||||||
const parsedValue = getValueFormat(format)(
|
const parsedValue = getValueFormat(format)(
|
||||||
parseFloat(value),
|
parseFloat(value),
|
||||||
12,
|
undefined,
|
||||||
12,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const decimalSplitted = parsedValue.text.split('.');
|
const decimalSplitted = parsedValue.text.split('.');
|
||||||
if (
|
if (decimalSplitted.length === 1) {
|
||||||
decimalSplitted.length === 1 ||
|
|
||||||
parseFloat(parsedValue.text) === parseInt(parsedValue.text, 10)
|
|
||||||
) {
|
|
||||||
decimalPrecision = 0;
|
decimalPrecision = 0;
|
||||||
} else {
|
} else {
|
||||||
const decimalDigits = decimalSplitted[1].split('');
|
const decimalDigits = decimalSplitted[1].split('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user