"use client" import { PieChart, Pie, Cell, ResponsiveContainer, Legend, Tooltip } from "recharts" import { Loader2 } from "lucide-react" interface DetectionDonutChartProps { potholes: number signboards: number isLoading: boolean } const COLORS = { pothole: "#ef4444", signboard: "#3b82f6" } export function DetectionDonutChart({ potholes, signboards, isLoading }: DetectionDonutChartProps) { if (isLoading) { return (
No detections found
Process videos to see data
{data.name}
Count: {data.value}
{((Number(data.value) / total) * 100).toFixed(1)}% of total
{total}
Total