import { BarChart, Bar, LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer, } from 'recharts'; interface TrendChartProps { title: string; data: Array<{ label: string; value: number }>; color: string; type: 'bar' | 'line'; formatter?: (value: number) => string; onBarClick?: (label: string) => void; } export function TrendChart({ title, data, color, type, formatter, onBarClick }: TrendChartProps) { const tooltipStyle = { background: '#363a4f', border: '1px solid #494d64', borderRadius: 6, color: '#cad3f5', fontSize: 12, }; const formatValue = (v: number) => (formatter ? [formatter(v), title] : [String(v), title]); return (