mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(图表): 修复数值格式后的值出现-0或者-0.00(即负零)的问题,将视为0或者0.00 #13222
This commit is contained in:
@@ -51,7 +51,11 @@ function transUnit(value, formatter) {
|
||||
}
|
||||
|
||||
function transDecimal(value, formatter) {
|
||||
return value.toFixed(formatter.decimalCount)
|
||||
const resultV = value.toFixed(formatter.decimalCount)
|
||||
if (Object.is(parseFloat(resultV), -0)) {
|
||||
return resultV.slice(1)
|
||||
}
|
||||
return resultV
|
||||
}
|
||||
|
||||
function transSeparatorAndSuffix(value, formatter) {
|
||||
|
||||
Reference in New Issue
Block a user