'use client'; import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, } from 'recharts'; // eslint-disable-next-line @typescript-eslint/no-explicit-any type TooltipFormatter = (value: any, name: any) => [string, string]; interface DistrictBarChartProps { data: { district: string; price?: number; 'Gia/m2'?: number; listings: number }[]; height?: number; dataKey?: string; tooltipFormatter?: TooltipFormatter; } export function DistrictBarChart({ data, height = 300, dataKey = 'price', tooltipFormatter, }: DistrictBarChartProps) { const defaultFormatter: TooltipFormatter = (value, name) => [ name === dataKey ? `${value} tr/m²` : String(value), name === dataKey ? 'Giá' : 'Tin đăng', ]; return ( ); }