Skip to content

Commit

Permalink
MWPW-159236 Fix duplicate percent in donut chart tooltip (adobecom#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganthecoder authored and Jens Singler committed Oct 7, 2024
1 parent 7dde648 commit 5496cb1
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 5496cb1

Please sign in to comment.