Skip to main content

Interface: GeoVisLegendProps

Defined in: ui/GeoVisLegend.tsx:213

Properties

breaks?

optional breaks?: number[]

Defined in: ui/GeoVisLegend.tsx:224

Quantitative legend breaks provided by the caller (already computed externally). When omitted, the component falls back to colorBy.thresholds from the spec so the legend stays in sync with the painted map without duplicating the threshold list at the call site. Pass an explicit empty array ([]) to force the single-bin "All values" rendering regardless of any thresholds declared in the spec.


className?

optional className?: string

Defined in: ui/GeoVisLegend.tsx:228

Optional CSS class for the legend container.


formatValue?

optional formatValue?: (value) => string

Defined in: ui/GeoVisLegend.tsx:226

Optional formatter for quantitative break labels.

Parameters

ParameterType
valuenumber

Returns

string


legendId

legendId: string

Defined in: ui/GeoVisLegend.tsx:215

Id of the legend entry to render (resolved from spec.legends or layer.legends).


sourceNode?

optional sourceNode?: ReactNode

Defined in: ui/GeoVisLegend.tsx:235

React node displayed as the source attribution below legend items. Use this when you need rich HTML content (e.g. a custom anchor element) that cannot be expressed through the reference string syntax. Takes precedence over LegendSpec.reference when both are provided.