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 } export default function LineChart({ data, series, xKey, height = 240, label, }: LineChartProps) { return (
{label &&
{label}
} {series.length > 1 && ( )} {series.map(s => ( ))}
) }