Interface: CosmographRangeColorLegendConfig
Extends
Properties
useLinksData?
optionaluseLinksData:boolean
Whether to use the data from the links instead of the points for the size legend.
Default: false
Inherited from
CosmographRangeColorLegendConfigInterface.useLinksData
selectOnClick?
optionalselectOnClick:boolean
Whether to select the points/links with the corresponding values when clicking on the legend elements.
Default: true
Inherited from
CosmographRangeColorLegendConfigInterface.selectOnClick
steps?
optionalsteps:number
Specifies the number of color gradations in the range legend.
The CosmographRangeColorLegend divides the current accessor’s extent into this many discrete steps.
Each step corresponds to a color value derived from the current pointColorByFn or linkColorByFn.
Overridden if overrideColors is provided by overrideColors length.
Default: 10
Inherited from
CosmographRangeColorLegendConfigInterface.steps
overrideColors?
optionaloverrideColors:RangeLegendColor[]
The color scheme for the color range legend, specified as an array of colors.
The first color represents the start of the range, and the last color represents the end of the range.
Can be an array of [number, number, number, number] or string.
The colors can be specified as a 4-element array of [r, g, b, a] values (where each component is between 0 and 255),
or as a CSS color string (e.g. ‘#ff0000’ for red).
Inherited from
CosmographRangeColorLegendConfigInterface.overrideColors
useDiscreteColors?
optionaluseDiscreteColors:boolean
When true and overrideColors is provided, displays the legend colors as discrete bands
instead of a continuous gradient. This creates clear separation between color categories.
Has no effect if overrideColors is not provided.
Default: false
Inherited from
CosmographRangeColorLegendConfigInterface.useDiscreteColors
useQuantiles?
optionaluseQuantiles:boolean
Whether to use quantiles to get size legend min/max.
Inherited from
CosmographRangeColorLegendConfigInterface.useQuantiles
hidden?
optionalhidden:boolean
Whether to hide the legend.
Default: false
Inherited from
CosmographRangeColorLegendConfigInterface.hidden
preserveSelectionOnUnmount?
optionalpreserveSelectionOnUnmount:boolean
Preserves the selection on unmount.
Default
falseInherited from
CosmographRangeColorLegendConfigInterface.preserveSelectionOnUnmount
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
''Inherited from
RangeColorLegendConfigInterface.label
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
undefinedInherited from
RangeColorLegendConfigInterface.labelFormatter
extentLabels?
optionalextentLabels: [string|number,string|number]
The labels to use for the minimum and maximum values of the color legend.
Default
undefinedInherited from
RangeColorLegendConfigInterface.extentLabels
enableEvents?
optionalenableEvents:boolean
Whether to enable event handling for the color legend.
Default
trueInherited from
RangeColorLegendConfigInterface.enableEvents
showSublabels?
optionalshowSublabels:boolean
Whether to show sublabels for the minimum and maximum values of the color legend.
Default
falseInherited from
RangeColorLegendConfigInterface.showSublabels
minSubLabel?
optionalminSubLabel:string
The label to use for the minimum value of the color legend.
Default
'min'Inherited from
RangeColorLegendConfigInterface.minSubLabel
maxSubLabel?
optionalmaxSubLabel:string
The label to use for the maximum value of the color legend.
Default
'max'Inherited from
RangeColorLegendConfigInterface.maxSubLabel
discreteColors?
optionaldiscreteColors:boolean
Whether to use display colors extent as discrete segments or continuous gradient.
Default
falseInherited from
RangeColorLegendConfigInterface.discreteColors
onClick()?
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
Inherited from
RangeColorLegendConfigInterface.onClick
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
Inherited from
RangeColorLegendConfigInterface.onMinClick
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
Inherited from
RangeColorLegendConfigInterface.onMaxClick
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