use truncation instead of rounding down or rounding to the nearest value when numerical calculations exceed precision limits
This commit is contained in:
@@ -243,7 +243,7 @@ const chartOptions = computed<object>(() => {
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: (params: CallbackDataParams) => {
|
||||
return formatAmountToLocalizedNumeralsWithCurrency(Math.floor(params.value as number), props.account.currency);
|
||||
return formatAmountToLocalizedNumeralsWithCurrency(Math.trunc(params.value as number), props.account.currency);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -389,7 +389,7 @@ const chartOptions = computed<object>(() => {
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: (params: CallbackDataParams) => {
|
||||
return formatAmountToLocalizedNumeralsWithCurrency(Math.floor(params.value as number), props.defaultCurrency);
|
||||
return formatAmountToLocalizedNumeralsWithCurrency(Math.trunc(params.value as number), props.defaultCurrency);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user