JavaScript & React libraryAPIInterfacesCosmographSizeLegendConfig

Interface: CosmographSizeLegendConfig

Extends

Properties

useLinksData?

optional useLinksData: boolean

Whether to use the data from the links instead of the points for the size legend. Default: false

Inherited from

CosmographSizeLegendConfigInterface.useLinksData


hideWhenSizeMoreThan?

optional hideWhenSizeMoreThan: number

The maximum size of points/links to show in the size legend. Points/links with a size greater than this value will cause the legend to hide.

Inherited from

CosmographSizeLegendConfigInterface.hideWhenSizeMoreThan


selectOnClick?

optional selectOnClick: boolean

Whether to select the points/links with the corresponding values when clicking on the legend elements. Default: true

Inherited from

CosmographSizeLegendConfigInterface.selectOnClick


overrideExtent?

optional overrideExtent: [number, number]

The custom extent to use for the size legend, specified as a tuple of [min, max] values. If not provided, the legend will automatically determine the extent based on the data.

Inherited from

CosmographSizeLegendConfigInterface.overrideExtent


useQuantiles?

optional useQuantiles: boolean

Whether to use quantiles to get size legend min/max.

Inherited from

CosmographSizeLegendConfigInterface.useQuantiles


hidden?

optional hidden: boolean

Whether to hide the legend. Default: false

Inherited from

CosmographSizeLegendConfigInterface.hidden


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

Omit.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

Omit.loadingMessage


disableStateMessages?

optional disableStateMessages: boolean

Whether to disable all messages in the DisplayState element.

Default

false

Inherited from

Omit.disableStateMessages


allowPointerEvents?

optional allowPointerEvents: boolean

Whether to allow pointer events on the DisplayState element when message is visible.

Default

false

Inherited from

Omit.allowPointerEvents


label?

optional label: string | (accessor?) => string

The label for the size legend. Can be a string or a function that returns a string based on an accessor.

Default

''

Inherited from

Omit.label


labelFormatter()?

optional labelFormatter: (n) => string

The label formatter function to format the size legend label.

Parameters

ParameterTypeDescription
nnumberThe value to format.

Returns

string

The formatted label string.

Default

undefined

Inherited from

Omit.labelFormatter


extentLabels?

optional extentLabels: [number, number]

The labels for the extent of the size legend, represented as a tuple of [min, max] values.

Default

undefined

Inherited from

Omit.extentLabels


enableEvents?

optional enableEvents: boolean

Whether to enable events for the size legend.

Default

true

Inherited from

Omit.enableEvents


showSublabels?

optional showSublabels: boolean

Whether to show sublabels for the size legend.

Default

false

Inherited from

Omit.showSublabels


minSubLabel?

optional minSubLabel: string

The label for the minimum value in the size legend.

Default

'min'

Inherited from

Omit.minSubLabel


maxSubLabel?

optional maxSubLabel: string

The label for the maximum value in the size legend.

Default

'max'

Inherited from

Omit.maxSubLabel


onClick()?

optional onClick: (e) => void

Callback function that is called when the size legend is clicked.

Parameters

ParameterTypeDescription
eEventThe click event object.

Returns

void

Inherited from

Omit.onClick


onMinClick()?

optional onMinClick: (size, value, e) => void

Callback function that is called when the minimum value in the size legend is clicked.

Parameters

ParameterTypeDescription
sizeundefined | numberThe current size value.
valueundefined | numberThe current value associated with the size.
eEventThe click event object.

Returns

void

Inherited from

Omit.onMinClick


onMaxClick()?

optional onMaxClick: (size, value, e) => void

Callback function that is called when the maximum value in the size legend is clicked.

Parameters

ParameterTypeDescription
sizeundefined | numberThe current size value.
valueundefined | numberThe current value associated with the size.
eEventThe click event object.

Returns

void

Inherited from

Omit.onMaxClick


onHover()?

optional onHover: (e) => void

Callback function that is called when the size legend is hovered over.

Parameters

ParameterTypeDescription
eEventThe hover event object.

Returns

void

Inherited from

Omit.onHover