Skip to main content

Interface: QuantitativeColorBy

Defined in: spec/types.legend.ts:34

Quantitative color mapping from a numeric feature property to a palette via a scale. Currently only the explicit 'threshold' scale is supported; thresholds defines the break points used to bucket feature values.

Properties​

colors?​

optional colors?: string[]

Defined in: spec/types.legend.ts:52

Explicit ordered list of colors; overrides palette when provided.


defaultColor?​

optional defaultColor?: string

Defined in: spec/types.legend.ts:54

Fallback color for missing or non-numeric values.


palette?​

optional palette?: string

Defined in: spec/types.legend.ts:50

Named palette key (resolved by the adapter/consumer).


property?​

optional property?: string

Defined in: spec/types.legend.ts:44

Has no effect. The colour always comes from the layer's mapData dataset, read from feature-state under its stateKey (default 'value'), never from a GeoJSON property named here. Accepted for compatibility with specs that still declare it; leave it out of new specs.

Deprecated​

The colour reads the layer's mapData; this field is ignored.


scale​

scale: "threshold"

Defined in: spec/types.legend.ts:46

Scale used to map numeric values into discrete color buckets.


thresholds?​

optional thresholds?: number[]

Defined in: spec/types.legend.ts:48

Explicit break points for the threshold scale.


type​

type: "quantitative"

Defined in: spec/types.legend.ts:35