Fix: TypeScript error in ChartCard
Error: 'percent' is possibly 'undefined' Fix: (percent || 0) para garantir fallback Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,7 +163,7 @@ export function ChartCard({
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
labelLine={false}
|
||||
label={({ name, percent }) => `${name} (${(percent * 100).toFixed(0)}%)`}
|
||||
label={({ name, percent }) => `${name} (${((percent || 0) * 100).toFixed(0)}%)`}
|
||||
outerRadius={100}
|
||||
fill="#8884d8"
|
||||
dataKey={dataKey}
|
||||
|
||||
Reference in New Issue
Block a user