From 2ea399d616177c1a935027f6c26562a85674f65d Mon Sep 17 00:00:00 2001 From: Kim Truong <47833996+khtruong@users.noreply.github.com> Date: Tue, 9 Apr 2019 20:37:00 -0700 Subject: [PATCH] fix: use correct number format (#47) --- .../src/BigNumber/transformProps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-big-number/src/BigNumber/transformProps.js b/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-big-number/src/BigNumber/transformProps.js index 476981c0e..b576fcbb1 100644 --- a/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-big-number/src/BigNumber/transformProps.js +++ b/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-big-number/src/BigNumber/transformProps.js @@ -63,7 +63,7 @@ export default function transformProps(chartProps) { const compareValue = sortedData[compareIndex][metricName]; percentChange = compareValue === 0 ? 0 : (bigNumber - compareValue) / Math.abs(compareValue); - const formatPercentChange = getNumberFormatter(NumberFormats.PERCENT_CHANGE_1_POINT); + const formatPercentChange = getNumberFormatter(NumberFormats.PERCENT_SIGNED_1_POINT); formattedSubheader = `${formatPercentChange(percentChange)} ${compareSuffix}`; } }