mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-29 12:34:28 +08:00
Compare commits
1 Commits
e3218daa52
...
ba047f84bd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba047f84bd |
@@ -94,7 +94,7 @@ const BarChart: React.FC<Props> = ({
|
||||
return value === 0
|
||||
? 0
|
||||
: metricField.dataFormatType === 'percent'
|
||||
? `${formatByDecimalPlaces(metricField.dataFormat?.needMultiply100 ? +value * 100 : value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||
? `${formatByDecimalPlaces(value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||
: getFormattedValue(value);
|
||||
},
|
||||
},
|
||||
@@ -116,7 +116,7 @@ const BarChart: React.FC<Props> = ({
|
||||
: metricField.dataFormatType === 'percent' ||
|
||||
metricField.dataFormatType === 'decimal'
|
||||
? `${formatByDecimalPlaces(
|
||||
metricField.dataFormat?.needMultiply100 ? +item.value * 100 : item.value,
|
||||
item.value,
|
||||
metricField.dataFormat?.decimalPlaces || 2
|
||||
)}${metricField.dataFormatType === 'percent' ? '%' : ''}`
|
||||
: getFormattedValue(item.value)
|
||||
@@ -151,7 +151,7 @@ const BarChart: React.FC<Props> = ({
|
||||
return value === 0
|
||||
? 0
|
||||
: metricField.dataFormatType === 'percent'
|
||||
? `${formatByDecimalPlaces(metricField.dataFormat?.needMultiply100 ? +value * 100 : value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||
? `${formatByDecimalPlaces(value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||
: getFormattedValue(value);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user