/* VolumeTrend — area chart of tickets opened per day for the last 30 days. * * Single series, Wulf Blue fill at 20%. No grid, minimal axes — the * shape is what matters. Tooltip carries the exact count + date. */ 'use client'; import { Area, AreaChart, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts'; import { useUserTimezone } from '@/lib/hooks/use-user-timezone'; interface VolumePoint { date: string; count: number; } interface VolumeTrendProps { data: VolumePoint[]; height?: number; } function fmtDate(iso: string, tz: string) { return new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric', timeZone: tz }); } export function VolumeTrend({ data, height = 180 }: VolumeTrendProps) { const tz = useUserTimezone(); return ( fmtDate(iso, tz)} interval="preserveStartEnd" minTickGap={48} tick={{ fontSize: 11, fill: 'var(--muted-foreground)' }} axisLine={false} tickLine={false} /> fmtDate(String(value), tz)} formatter={(value) => [value ?? 0, 'opened']} /> ); }