Reverted to edit edt-a41ccf6f-28b9-4a12-b13f-4d1674c2ef41: "Fix expense chart labels

The labels on the expense chart were missing. This commit fixes the issue by ensuring the labels are displayed correctly."
This commit is contained in:
gpt-engineer-app[bot]
2025-03-21 12:07:28 +00:00
parent 3b90e7396d
commit 552706e408

View File

@@ -27,10 +27,7 @@ const ExpenseChart: React.FC<ExpenseChartProps> = ({ data }) => {
paddingAngle={5} paddingAngle={5}
dataKey="value" dataKey="value"
labelLine={true} labelLine={true}
label={({ name, percent }) => ( label={({ name, percent }) => `${name} ${(percent * 100).toFixed(0)}%`}
`${name} ${(percent * 100).toFixed(0)}%`
)}
fontSize={12}
> >
{data.map((entry, index) => ( {data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={entry.color} /> <Cell key={`cell-${index}`} fill={entry.color} />