JavaScript & React libraryAPI

Interface: CosmographSizeLegendConfigInterface

Extended by

Properties

useLinksData?

optional useLinksData: boolean

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


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.


selectOnClick?

optional selectOnClick: boolean

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


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.


useQuantiles?

optional useQuantiles: boolean

Whether to use quantiles to get size legend min/max. Has no effect if useLinksData is false and active point size strategy is PointSizeStrategy.PreciseDegree (won’t use quantiles) or PointSizeStrategy.Degree (will always use quantiles).


preserveSelectionOnUnmount?

optional preserveSelectionOnUnmount: boolean

Preserves the selection on unmount.

Default

false

labelResolver()?

optional labelResolver: (accessor?) => string

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

Parameters

ParameterType
accessor?string

Returns

string