RenderOptionLegend interface

Configuration for generating a data legend.

Properties

labels

Text labels to display on the legend.

scaleFactor

A factor to multiply interval legend labels by. Useful for scaled rasters whose colormap definitions map to unscaled values, effectively showing legend labels as scaled values.

trimEnd

Number of items to trim from the end of the legend.

trimStart

The number of items to trim from the start of the legend definition. Used if there are values important for rendering (e.g. nodata) that aren't desirable in the legend.

type

Legend type to make, one of: continuous, classmap, interval or none (note, none is a string literal).

Property Details

labels

Text labels to display on the legend.

labels?: string[]

Property Value

string[]

scaleFactor

A factor to multiply interval legend labels by. Useful for scaled rasters whose colormap definitions map to unscaled values, effectively showing legend labels as scaled values.

scaleFactor?: number

Property Value

number

trimEnd

Number of items to trim from the end of the legend.

trimEnd?: number

Property Value

number

trimStart

The number of items to trim from the start of the legend definition. Used if there are values important for rendering (e.g. nodata) that aren't desirable in the legend.

trimStart?: number

Property Value

number

type

Legend type to make, one of: continuous, classmap, interval or none (note, none is a string literal).

type?: string

Property Value

string