import { ResponsiveContainer, AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip as RechartsTooltip } from "recharts"; import { format } from "date-fns"; import type { ParsedReading } from "@/hooks/use-readings"; interface TelemetryChartProps { data: ParsedReading[]; dataKey: "ph" | "turbidity" | "temperature" | "hardness"; color: string; title: string; unit: string; } export function TelemetryChart({ data, dataKey, color, title, unit }: TelemetryChartProps) { const gradientId = `color-${dataKey}`; return (