Skip to main content

HeatmapSpec

How a heatmap is drawn. The legend names each step of the ramp with a word for how dense the points are, so density never rests on colour alone.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { HeatmapSpec } from "@mapcairn/core";

interface HeatmapSpec

Properties​

intensity​

readonly intensity: HeatmapValue;

Multiplies each point's weight, 0.1 to 5.

radius​

readonly radius: HeatmapValue;

Pixels each point spreads over, 4 to 80.

ramp​

readonly ramp: readonly PaletteSlot[];

Ordinal colours from the lowest density to the highest. Three to five.

weightField​

readonly weightField?: string;

The field that weights each point (a decoded field, or a tile property). Each counts 1 without it.

words​

readonly words: readonly DefinitionText[];

One word for each step of the ramp, such as Sparse, Moderate, Dense.

See also​

Source: packages/core/src/layers/definition.ts:712