'use client'; import { RadialBar, RadialBarChart, ResponsiveContainer } from 'recharts'; import { TODAY_CHART_PRIMARY_COLOR } from '@/components/today/chart-theme'; interface TodayRadialGaugeChartProps { percent: number; completed: number; total: number; percentLabel: string; tasksLabel: string; } export function TodayRadialGaugeChart({ percent, completed, total, percentLabel, tasksLabel, }: TodayRadialGaugeChartProps) { const clamped = Math.max(0, Math.min(100, percent)); const data = [{ name: 'completion', value: clamped, fill: TODAY_CHART_PRIMARY_COLOR }]; return (
{percentLabel} {tasksLabel} {total > 0 ? ( {completed}/{total} ) : null}
); }