Interface: CategoricalColorBy
Defined in: spec/types.legend.ts:8
Categorical color mapping from a discrete feature property.
Explicit color assignment is defined by mapping. Other fields such as
colors and palette are adapter-specific hints and are not guaranteed to
participate in categorical value resolution. Values not covered by
mapping may fall back to defaultColor, depending on the consumer.
Properties
colors?
optionalcolors?:string[]
Defined in: spec/types.legend.ts:20
Explicit color list available for adapter-specific categorical handling.
defaultColor?
optionaldefaultColor?:string
Defined in: spec/types.legend.ts:24
Fallback color for values not covered by mapping.
mapping?
optionalmapping?:Record<string,string>
Defined in: spec/types.legend.ts:22
Explicit value-to-color overrides.
palette?
optionalpalette?:string
Defined in: spec/types.legend.ts:18
Named palette key available for adapter-specific categorical handling.
property
property:
string
Defined in: spec/types.legend.ts:16
Key identifying the column in the mapData dataset whose value drives
the color assignment. The adapter reads this value from
feature-state.value (written by setFeatureState during data join),
not directly from a GeoJSON feature property.
type
type:
"categorical"
Defined in: spec/types.legend.ts:9