import React, { useMemo } from 'react'; import { PieChart, Pie, Cell, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import { SpotlightCard } from '../SpotlightCard'; import { InfoTooltip } from '../InfoTooltip'; const COLORS = { 'Excellent': '#10b981', // emerald-500 'Good': '#3b82f6', // blue-500 'Fair': '#eab308', // yellow-500 'Needs Repair': '#ef4444' // red-500 }; const CustomTooltip = ({ active, payload }) => { if (active && payload && payload.length) { return (
{payload[0].name}
{payload[0].value} Properties ({((payload[0].payload.percent || 0) * 100).toFixed(0)}%)
Territory health snapshot