import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import type { TimeSeriesDataPoint } from '@/types'; interface TimeSeriesChartProps { data: TimeSeriesDataPoint[]; loading?: boolean; } export function TimeSeriesChart({ data, loading }: TimeSeriesChartProps) { if (loading) { return (
); } if (!data || data.length === 0) { return (

Report Trends

No data available for the selected period
); } return (

Report Trends Over Time

{data.some(d => d.eventCount !== undefined) && ( )} {data.some(d => d.litterCollected > 0) && ( )}
); }