mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(plugins): missing currency on small number format in table chart (#27041)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import {
|
||||
CurrencyFormatter,
|
||||
DataRecordValue,
|
||||
GenericDataType,
|
||||
getNumberFormatter,
|
||||
@@ -64,6 +65,11 @@ export function formatColumnValue(
|
||||
const smallNumberFormatter =
|
||||
config.d3SmallNumberFormat === undefined
|
||||
? formatter
|
||||
: config.currencyFormat
|
||||
? new CurrencyFormatter({
|
||||
d3Format: config.d3SmallNumberFormat,
|
||||
currency: config.currencyFormat,
|
||||
})
|
||||
: getNumberFormatter(config.d3SmallNumberFormat);
|
||||
return formatValue(
|
||||
isNumber && typeof value === 'number' && Math.abs(value) < 1
|
||||
|
||||
Reference in New Issue
Block a user