Interface: RangeColorLegendConfigInterface
Extends
Properties
noDataMessage?
optional
noDataMessage: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?
optional
loadingMessage: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?
optional
disableStateMessages:boolean
Whether to disable all messages in the DisplayState element.
Default
false
Inherited from
DisplayStateConfigInterface
.disableStateMessages
allowPointerEvents?
optional
allowPointerEvents:boolean
Whether to allow pointer events on the DisplayState element when message is visible.
Default
false
Inherited from
DisplayStateConfigInterface
.allowPointerEvents
label?
optional
label: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()?
optional
labelFormatter: (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
undefined
extent?
optional
extent:RangeLegendColor
[]
The array of colors to use for the color legend. Can be an array of [number, number, number, number]
or string
Default
undefined
extentLabels?
optional
extentLabels: [string
|number
,string
|number
]
The labels to use for the minimum and maximum values of the color legend.
Default
undefined
enableEvents?
optional
enableEvents:boolean
Whether to enable event handling for the color legend.
Default
true
showSublabels?
optional
showSublabels:boolean
Whether to show sublabels for the minimum and maximum values of the color legend.
Default
false
minSubLabel?
optional
minSubLabel:string
The label to use for the minimum value of the color legend.
Default
'min'
maxSubLabel?
optional
maxSubLabel:string
The label to use for the maximum value of the color legend.
Default
'max'
discreteColors?
optional
discreteColors:boolean
Whether to use display colors extent
as discrete segments or continuous gradient.
Default
false
onClick()?
optional
onClick: (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()?
optional
onMinClick: (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()?
optional
onMaxClick: (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()?
optional
onHover: (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