Skip to content

Commit d8dc5ef

Browse files
authored
fix(PieChart / DonutChart): fix hide data label logic (#668)
1 parent 743d6d8 commit d8dc5ef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/charts/src/components/PieChart/PieChart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ const PieChart: FC<PieChartProps> = forwardRef((props: PieChartProps, ref: Ref<H
202202

203203
const renderLabelLine = useCallback(
204204
(props) => {
205-
if (!measure.hideDataLabel || chartConfig.activeSegment === props.index) return null;
205+
if (measure.hideDataLabel || chartConfig.activeSegment === props.index) return null;
206206
return Pie.renderLabelLineItem(undefined, props);
207207
},
208-
[chartConfig.activeSegment]
208+
[chartConfig.activeSegment, measure.hideDataLabel]
209209
);
210210

211211
const legendWrapperStyle = useMemo(() => {

0 commit comments

Comments
 (0)