Update category chart appearance

Modify the appearance of the category chart to have an inset look.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 13:02:14 +00:00
parent a5eb629f0c
commit ab38a1931e
2 changed files with 23 additions and 28 deletions

View File

@@ -15,30 +15,28 @@ interface ExpenseChartProps {
const ExpenseChart: React.FC<ExpenseChartProps> = ({ data }) => {
return (
<div className="neuro-card h-72 desktop-card">
<ResponsiveContainer width="100%" height="100%">
<PieChart margin={{ left: 30, right: 30, top: 20, bottom: 20 }}>
<Pie
data={data}
cx="50%"
cy="50%"
innerRadius={50}
outerRadius={80}
paddingAngle={5}
dataKey="value"
labelLine={false}
label={({ name, percent }) => (
`${name} ${(percent * 100).toFixed(0)}%`
)}
fontSize={12}
>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={entry.color} />
))}
</Pie>
</PieChart>
</ResponsiveContainer>
</div>
<ResponsiveContainer width="100%" height="100%">
<PieChart margin={{ left: 30, right: 30, top: 20, bottom: 20 }}>
<Pie
data={data}
cx="50%"
cy="50%"
innerRadius={50}
outerRadius={80}
paddingAngle={5}
dataKey="value"
labelLine={false}
label={({ name, percent }) => (
`${name} ${(percent * 100).toFixed(0)}%`
)}
fontSize={12}
>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={entry.color} />
))}
</Pie>
</PieChart>
</ResponsiveContainer>
);
};