import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, } from "recharts"; import { DataPoint } from "../types"; interface ChartProps { data: DataPoint[]; dataKey: keyof DataPoint; color: string; unit: string; title: string; } export function DashboardChart({ data, dataKey, color, unit, title, }: ChartProps) { // Simple formatter for Y Axis const formatYAxis = (tickItem: number) => { if (tickItem > 1000) { return `${(tickItem / 1000).toFixed(1)}k`; } return tickItem.toFixed(0); }; return (