mirror of
https://github.com/apache/superset.git
synced 2024-09-19 20:19:37 -04:00
fix: use correct number format (#47)
This commit is contained in:
parent
5a643dd047
commit
ec5be03d8f
@ -63,7 +63,7 @@ export default function transformProps(chartProps) {
|
|||||||
const compareValue = sortedData[compareIndex][metricName];
|
const compareValue = sortedData[compareIndex][metricName];
|
||||||
percentChange =
|
percentChange =
|
||||||
compareValue === 0 ? 0 : (bigNumber - compareValue) / Math.abs(compareValue);
|
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}`;
|
formattedSubheader = `${formatPercentChange(percentChange)} ${compareSuffix}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user