Skip to content

Commit

Permalink
fix: use correct number format (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
khtruong authored and zhaoyongjie committed Nov 26, 2021
1 parent 5a643dd commit ec5be03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
}
Expand Down

0 comments on commit ec5be03

Please sign in to comment.