From e9fcf3aac90846f5920ff47f237cde122e57038a Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Fri, 8 Nov 2024 12:54:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20donutLabel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DonutChart/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/DonutChart/index.tsx b/src/DonutChart/index.tsx index be92fee..88aad24 100644 --- a/src/DonutChart/index.tsx +++ b/src/DonutChart/index.tsx @@ -149,9 +149,10 @@ const DonutChart = forwardRef((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)} ) : null}