Skip to content

Commit

Permalink
fix: keep always two digits at PieWidgetUI default percentFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
jantolg committed Mar 6, 2024
1 parent 80efba0 commit 8f19a6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-ui/src/widgets/PieWidgetUI/PieWidgetUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ function PieWidgetUI({
const _percentFormatter = useMemo(
() =>
percentFormatter ||
((v) => `${intl.formatNumber(v, { maximumFractionDigits: 2 })}%`),
((v) =>
`${intl.formatNumber(v, {
maximumFractionDigits: 2,
minimumFractionDigits: 2
})}%`),
[intl, percentFormatter]
);
// Tooltip
Expand Down

0 comments on commit 8f19a6d

Please sign in to comment.