Interface: DensityColorBy
Defined in: spec/types.legend.ts:73
A density gradient for a heatmap layer: the legend shows the layer's own
heatmapColors as a continuous bar, from the lowest density to the
highest. It reads its colours from the heatmap layer that points at it
through activeLegendId (or declares it in its own legends), so the
legend and the map can never disagree.
Example
const colorBy: DensityColorBy = {
type: 'density',
lowLabel: 'Fewer crashes',
highLabel: 'More crashes',
};
Properties
highLabel?
optionalhighLabel?:string
Defined in: spec/types.legend.ts:78
Label under the high end of the gradient. Default: a localized "More".
lowLabel?
optionallowLabel?:string
Defined in: spec/types.legend.ts:76
Label under the low end of the gradient. Default: a localized "Less".
type
type:
"density"
Defined in: spec/types.legend.ts:74