"use client" import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from "recharts" import { Loader2 } from "lucide-react" interface LocationData { name: string potholes: number signboards: number total: number } interface LocationBarChartProps { data: LocationData[] isLoading: boolean } const COLORS = { pothole: "#ef4444", signboard: "#3b82f6" } export function LocationBarChart({ data, isLoading }: LocationBarChartProps) { if (isLoading) { return (
No location data available
Process videos to see detections by location
{label}
{payload.map((entry, index) => (