import { useTranslation } from 'react-i18next'; import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts'; import { SALES_STATS } from '../../constants/salesStats'; import { useChartColors } from '../../hooks/useChartColors'; interface DonutChartProps { data: { name: string; value: number; color?: string }[]; title: string; height?: number; } export function DonutChart({ data, title, height = SALES_STATS.CHART.PIE_HEIGHT, }: DonutChartProps) { const { t } = useTranslation(); const colors = useChartColors(); if (data.length === 0) { return (