// 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 (