classifyLegendEntries
classifyLegendEntries(
record,options?):ClassifyLegendEntry[]
Defined in: packages/core/src/classify/compile.ts:620
Legend lines for a record: a heading, one line per class (or category), then “Other” and “No data” when they can occur.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
record | ClassifyRecord | - |
options | { color?: string; layerType?: string; locale?: string; strings?: Strings; title?: string; } | - |
options.color? | string | Swatch colour when the record does not classify colour (radius only): the layer’s own literal colour. |
options.layerType? | string | - |
options.locale? | string | Number locale when format: names none (the page’s language). |
options.strings? | Strings | The document’s UI strings (“No data” and “Other” are maplibre-yaml.Classify.NoData / .Other). |
options.title? | string | The heading (the layer’s label, else the field). |
Returns
Section titled “Returns”no lines while a method: waits for its data.