Skip to content

Commit

Permalink
MWPW-159236 Fix duplicate percent in donut chart tooltip (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganthecoder authored Sep 30, 2024
1 parent 47b4739 commit 39ead2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/blocks/chart/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const donutTooltipFormatter = ({
name,
percent,
} = {}, unit = '') => (
`${marker} ${name}<br />${data[value[0]]}${unit} ${percent}%<i class="tooltip-icon"></i>`
`${marker} ${name}<br />${data[value[0]]}${unit}${unit !== '%' ? ` ${percent}%` : ''}<i class="tooltip-icon"></i>`
);

export const pieTooltipFormatter = ({
Expand Down

0 comments on commit 39ead2c

Please sign in to comment.