Skip to content

ClassifyRecord

Defined in: packages/core/src/classify/compile.ts:90

A resolved classify: block — what the compiled expression means.

Recorded in the emitted style as layer.metadata["maplibre-yaml:classify"]. Plain JSON: colours are hex, the palette name is canonical, breaks are the thresholds actually drawn (computed ones included).

PropertyTypeDescriptionDefined in
breaks?number[]Numeric: step thresholds. Absent while a method: waits for its data.packages/core/src/classify/compile.ts:103
categories?ClassifyCategory[]Categorical: the listed values and their colours.packages/core/src/classify/compile.ts:112
classes?number-packages/core/src/classify/compile.ts:101
colors?string[]Numeric: one colour per class.packages/core/src/classify/compile.ts:105
fieldstring-packages/core/src/classify/compile.ts:91
format?NumberFormatOptionsLegend number format.packages/core/src/classify/compile.ts:118
kind"numeric" | "categorical"-packages/core/src/classify/compile.ts:96
method?"quantile" | "equal" | "jenks"Numeric: computed-break method, and the class count it was asked for.packages/core/src/classify/compile.ts:100
multiply?numberNumeric: the rate is multiplied by this (per 100,000 …).packages/core/src/classify/compile.ts:95
noDatastringColour for no-data features, or "hide".packages/core/src/classify/compile.ts:116
normalize?stringNumeric: the field is divided by this property (a rate).packages/core/src/classify/compile.ts:93
other?stringCategorical: colour for unlisted values, or "hide".packages/core/src/classify/compile.ts:114
palette?stringThe palette the colours came from (named, or the default).packages/core/src/classify/compile.ts:107
property?stringThe colour property the classes drive; absent when only radius is classified.packages/core/src/classify/compile.ts:98
radius?number[]Numeric, circle layers: one circle-radius per class.packages/core/src/classify/compile.ts:110
reverse?boolean-packages/core/src/classify/compile.ts:108
stats?ClassifyStatsWhat the data showed, when it was read (GeoJSON sources).packages/core/src/classify/compile.ts:120