Skip to content

Commit

Permalink
🐛 fix: Fix donutLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 8, 2024
1 parent 7f0e34d commit e9fcf3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/DonutChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ const DonutChart = forwardRef<HTMLDivElement, DonutChartProps>((props, ref) => {
x="50%"
y="50%"
>
{donutLabel || typeof activeIndex === 'number'
? valueFormatter(data?.[activeIndex as any]?.[category])
: parsedLabelInput}
{donutLabel ||
(typeof activeIndex === 'number'
? valueFormatter(data?.[activeIndex as any]?.[category])
: parsedLabelInput)}
</text>
) : null}
<Pie
Expand Down

0 comments on commit e9fcf3a

Please sign in to comment.