Interface: RangeColorLegendConfigInterface
Extends
Properties
noDataMessage?
optionalnoDataMessage:string|false
Text to display when there is no data. When set to false, this message will not be displayed.
Default
'No data'Inherited from
DisplayStateConfigInterface.noDataMessage
loadingMessage?
optionalloadingMessage:string|false
Text to display when data is loading. When set to false, this message will not be displayed.
Default
'Data loading...'Inherited from
DisplayStateConfigInterface.loadingMessage
disableStateMessages?
optionaldisableStateMessages:boolean
Whether to disable all messages in the DisplayState element.
Default
falseInherited from
DisplayStateConfigInterface.disableStateMessages
allowPointerEvents?
optionalallowPointerEvents:boolean
Whether to allow pointer events on the DisplayState element when message is visible.
Default
falseInherited from
DisplayStateConfigInterface.allowPointerEvents
label?
optionallabel:string| (accessor?) =>string
The label for the color legend. Can be a string or a function that returns a string based on an accessor.
Default
''labelFormatter()?
optionallabelFormatter: (n) =>string
The label formatter function to format the color legend label.
Parameters
| Parameter | Type | Description | 
|---|---|---|
n | number | The value to format. | 
Returns
string
The formatted label string.
Default
undefinedextent?
optionalextent:RangeLegendColor[]
The array of colors to use for the color legend. Can be an array of [number, number, number, number] or string
Default
undefinedextentLabels?
optionalextentLabels: [string|number,string|number]
The labels to use for the minimum and maximum values of the color legend.
Default
undefinedenableEvents?
optionalenableEvents:boolean
Whether to enable event handling for the color legend.
Default
trueshowSublabels?
optionalshowSublabels:boolean
Whether to show sublabels for the minimum and maximum values of the color legend.
Default
falseminSubLabel?
optionalminSubLabel:string
The label to use for the minimum value of the color legend.
Default
'min'maxSubLabel?
optionalmaxSubLabel:string
The label to use for the maximum value of the color legend.
Default
'max'discreteColors?
optionaldiscreteColors:boolean
Whether to use display colors extent as discrete segments or continuous gradient.
Default
falseonClick()?
optionalonClick: (e) =>void
Callback function that is called when the color legend is clicked.
Parameters
| Parameter | Type | Description | 
|---|---|---|
e | Event | The click event object. | 
Returns
void
onMinClick()?
optionalonMinClick: (color,value,e) =>void
Callback function that is called when the minimum value of the color legend is clicked.
Parameters
| Parameter | Type | Description | 
|---|---|---|
color | undefined | RangeLegendColor | The color of the minimum value, or undefined if no color is associated. | 
value | undefined | string | number | The value of the minimum, or undefined if no value is associated. | 
e | Event | The click event object. | 
Returns
void
onMaxClick()?
optionalonMaxClick: (color,value,e) =>void
Callback function that is called when the maximum value of the color legend is clicked.
Parameters
| Parameter | Type | Description | 
|---|---|---|
color | undefined | RangeLegendColor | The color of the maximum value, or undefined if no color is associated. | 
value | undefined | string | number | The value of the maximum, or undefined if no value is associated. | 
e | Event | The click event object. | 
Returns
void
onHover()?
optionalonHover: (e) =>void
Callback function that is called when the color legend is hovered over.
Parameters
| Parameter | Type | Description | 
|---|---|---|
e | Event | The hover event object. | 
Returns
void