// web/src/components/charts/VariableAllocationDonut.tsx import { PieChart, Pie, Cell, ResponsiveContainer, Tooltip, Legend } from "recharts"; export type VariableSlice = { name: string; value: number; isSavings: boolean }; export default function VariableAllocationDonut({ data }: { data: VariableSlice[] }) { const total = data.reduce((s, d) => s + d.value, 0); if (!data.length || total === 0) { return (

Variable Allocation

No categories configured yet.
); } const fillFor = (s: boolean) => (s ? "#165F46" : "#374151"); return (

Variable Allocation

{data.map((d, i) => )} `${v}%`} contentStyle={{ background: "#111827", border: "1px solid #111827", borderRadius: 12, color: "#E7E3D7" }} />
); }