JavaScript & React libraryAPI

Interface: CosmographHistogramConfigInterface

Extended by

Properties

accessor?

optional accessor: string

Data column key to access numeric values for the CosmographHistogram. Make sure it’s included in pointIncludeColumns or linkIncludeColumns if you’re not using this column as other point or link accessor.

Default

undefined

useQuantiles?

optional useQuantiles: boolean

Whether to use quantiles to compute the histogram extent (domain).

When true, the visual extent is computed from the \(5^{th}\) and \(95^{th}\) percentiles, effectively trimming extreme outliers from the visible range.

Note that if the visual edge is selected, the selection will automatically expand to include the full range of data (up to \(0^{th}\) or \(100^{th}\) percentile).

If customExtent is provided and useQuantiles is true, the final extent will be clamped to lie within customExtent.

Default

false

customExtent?

optional customExtent: [number, number]

Minimum and maximum extent for the CosmographHistogram visualisation. Can be used if you don’t want histogram range to be automatically calculated from data extent.

Default

undefined

useLinksData?

optional useLinksData: boolean

Defines type of Cosmograph Crossfilter to use. true for links, false for points. Can only be set once during initialization.

Default

false

highlightSelectedData?

optional highlightSelectedData: boolean

Whether to highlight currently selected data on histogram. If true, can impact performance.

Default

true

onSelection()?

optional onSelection: (selection, isManuallySelected?) => void

Callback for the range selection. Provides current selection of CosmographHistogram.

Parameters

ParameterTypeDescription
selection[number, number] | undefinedThe current selection range. If no selection is made, it will be undefined.
isManuallySelected?booleanIndicates whether the selection was made manually by the user.

Returns

void


preserveSelectionOnUnmount?

optional preserveSelectionOnUnmount: boolean

Preserves the selection on unmount.

Default

false

id?

optional id: string

Custom ID for the filtering client. If not provided, uses constructor name. Use this to maintain stable client connections across component remounts.

Default

undefined