import { useTranslation } from "react-i18next"; import { BarChart, Bar, XAxis, YAxis, Cell, ReferenceLine, Tooltip, ResponsiveContainer } from "recharts"; import type { HighlightMover } from "../../shared/types"; import { ChartPatternDefs, getPatternFill } from "../../utils/chartPatterns"; export interface HighlightsTopMoversChartProps { movers: HighlightMover[]; } function formatCurrency(amount: number, language: string): string { return new Intl.NumberFormat(language === "fr" ? "fr-CA" : "en-CA", { style: "currency", currency: "CAD", maximumFractionDigits: 0, }).format(amount); } export default function HighlightsTopMoversChart({ movers }: HighlightsTopMoversChartProps) { const { t, i18n } = useTranslation(); if (movers.length === 0) { return (