import { choroplethGradientCss } from '@/lib/choroplethColorScale' import { formatElectionNumber } from '@/lib/electionFormat' type ChoroplethLegendProps = { max: number metricLabel: string formatMax?: (max: number) => string /** What the colour means, in the caller's words. Shares the id with the scale selector. */ noteId?: string note?: string | null } export const ChoroplethLegend = ({ max, metricLabel, formatMax = formatElectionNumber, noteId, note, }: ChoroplethLegendProps) => (
0
{formatMax(max)}

{note ?? `Escala: intensidade da cor indica ${metricLabel} no território.`}

)