/* ResolutionTrend — line chart of average resolution hours per day completed, * last 30 days. Single series, Wulf Blue stroke. */ 'use client'; import { CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts'; interface ResolutionPoint { date: string; avgHours: number | null; } interface ResolutionTrendProps { data: ResolutionPoint[]; height?: number; } function fmtDate(iso: string) { return new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric' }); } export function ResolutionTrend({ data, height = 180 }: ResolutionTrendProps) { return ( `${v}h`} /> fmtDate(String(value))} formatter={(value) => value == null ? ['—', 'avg'] : [`${Number(value).toFixed(1)} h`, 'avg'] } /> ); }