Interface: CosmographTypeColorLegendConfig
Extends
Properties
useLinksData?
optionaluseLinksData:boolean
Whether to use the data from the links instead of the points for the type legend.
Default
false
Inherited from
CosmographTypeColorLegendConfigInterface.useLinksData
selectOnClick?
optionalselectOnClick:boolean
Whether to select the points/links with the corresponding values when clicking on the legend items.
Default
true
Inherited from
CosmographTypeColorLegendConfigInterface.selectOnClick
overrideItems?
optionaloverrideItems:TypeColorLegendItem[]
An optional array of TypeColorLegendItem objects that will override the default legend items.
Inherited from
CosmographTypeColorLegendConfigInterface.overrideItems
sortBy?
optionalsortBy:string
The field to sort the legend items by. Should be from the same table. If not provided, the items will not be sorted.
Inherited from
CosmographTypeColorLegendConfigInterface.sortBy
sortOrder?
optionalsortOrder:"desc"|"asc"
The order to sort the legend items in. Can be either âascâ for ascending order or âdescâ for descending order. If not provided, the items will not be sorted.
Inherited from
CosmographTypeColorLegendConfigInterface.sortOrder
hideUnknown?
optionalhideUnknown:boolean
Whether to hide legend items for unknown values.
Default
true
Inherited from
CosmographTypeColorLegendConfigInterface.hideUnknown
resetSelectionOnCollapse?
optionalresetSelectionOnCollapse:boolean
When the legend collapses (âshow lessâ is clicked), determines whether to deselect an item if it was selected from the expanded list but is now hidden.
Remarks
Has no effect if selectOnClick is false.
Default
true
Inherited from
CosmographTypeColorLegendConfigInterface.resetSelectionOnCollapse
hidden?
optionalhidden:boolean
Whether to hide the legend.
Default: false
Inherited from
CosmographTypeColorLegendConfigInterface.hidden
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
Omit.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
Omit.loadingMessage
disableStateMessages?
optionaldisableStateMessages:boolean
Whether to disable all messages in the DisplayState element.
Default
falseInherited from
Omit.disableStateMessages
allowPointerEvents?
optionalallowPointerEvents:boolean
Whether to allow pointer events on the DisplayState element when message is visible.
Default
falseInherited from
Omit.allowPointerEvents
alignRight?
optionalalignRight:boolean
Whether to align the color legend items to the right. When true, the legend items will be right-aligned within their container.
Default
falseInherited from
Omit.alignRight
maxDisplayedItems?
optionalmaxDisplayedItems:number
The maximum number of color legend items to display. When exceeded, a âshow moreâ button will appear to display additional items.
Default
15Inherited from
Omit.maxDisplayedItems
labelFormatter()?
optionallabelFormatter: (n) =>string
The label formatter function to format the legend labels.
Parameters
| Parameter | Type | Description | 
|---|---|---|
n | string | The label string to format | 
Returns
string
The formatted label string
Inherited from
Omit.labelFormatter
enableEvents?
optionalenableEvents:boolean
Whether to enable event handling for the color legend. When true, click and hover events will be active on legend items.
Default
trueInherited from
Omit.enableEvents
expanded?
optionalexpanded:boolean
Whether the color legend list (if âshow moreâ is active) is expanded or not.
Default
falseInherited from
Omit.expanded
onClick()?
optionalonClick: (e,item?) =>void
Callback function that is called when a color legend item is clicked.
Parameters
| Parameter | Type | Description | 
|---|---|---|
e | Event | The click event object | 
item? | TypeColorLegendItem | The color legend item that was clicked, or undefined if no item was clicked | 
Returns
void
Inherited from
Omit.onClick
onHover()?
optionalonHover: (e,item?) =>void
Callback function that is called when the mouse hovers over a color legend item.
Parameters
| Parameter | Type | Description | 
|---|---|---|
e | Event | The hover event object | 
item? | TypeColorLegendItem | The color legend item that was hovered over, or undefined if no item is being hovered | 
Returns
void
Inherited from
Omit.onHover
onShowMoreClick()?
optionalonShowMoreClick: (expanded) =>void
Callback function that is called when the âshow moreâ button is clicked.
Parameters
| Parameter | Type | Description | 
|---|---|---|
expanded | boolean | Whether the list is expanded or collapsed | 
Returns
void
Inherited from
Omit.onShowMoreClick