import { LineChart as RechartsLineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, } from 'recharts' interface LineSeries { dataKey: string color: string name?: string } interface LineChartProps { data: Record[] series: LineSeries[] xKey: string height?: number label?: string yFormatter?: (value: number) => string } export default function LineChart({ data, series, xKey, height = 240, label, yFormatter, }: LineChartProps) { return (
{label &&
{label}
} yFormatter(v) : undefined} /> {series.length > 1 && ( )} {series.map(s => ( ))}
) }