JavaScript & React libraryAPI Generated Docs

Interface: CallbackConfig

Extended by

Properties

onPointsFiltered()?

optional onPointsFiltered: (highlightedPoints, highlightedPointIndices, highlightedLinkIndices) => void

Fires whenever the highlight recomputes — either because a Mosaic clause on pointsSelection / linksSelection changed, or because the user point/link selection changed. Receives the surviving points table and the resolved highlighted point/link indices.

Parameters

ParameterTypeDescription
highlightedPointsCosmographDataA Table of point rows that survive the current highlight.
highlightedPointIndicesnumber[] | undefinedPoint indices in the resolved highlight.
highlightedLinkIndicesnumber[] | undefinedLink indices in the resolved highlight.

Returns

void


onLinksFiltered()?

optional onLinksFiltered: (highlightedLinks, highlightedPointIndices, highlightedLinkIndices) => void

Fires whenever the highlight recomputes — either because a Mosaic clause on pointsSelection / linksSelection changed, or because the user point/link selection changed. Receives the surviving links table and the resolved highlighted point/link indices.

Parameters

ParameterTypeDescription
highlightedLinksCosmographDataA Table of link rows that survive the current highlight.
highlightedPointIndicesnumber[] | undefinedPoint indices in the resolved highlight.
highlightedLinkIndicesnumber[] | undefinedLink indices in the resolved highlight.

Returns

void


onLabelClick()?

optional onLabelClick: (index, id, event) => void

Callback function that will be called when clicked on a label.

Parameters

ParameterTypeDescription
indexnumberPoint index for this label.
idstringPoint id for this label.
eventMouseEventCorresponding mouse event.

Returns

void


onAnnotationClick()?

optional onAnnotationClick: (id, event) => boolean | void

Callback function that will be called when clicked on an annotation label or anchor. Return false from an anchor click to prevent the default visibility toggle.

Parameters

ParameterTypeDescription
idstringAnnotation id.
eventMouseEventCorresponding mouse event.

Returns

boolean | void


onClusterLabelClick()?

optional onClusterLabelClick: (index, id, event) => void

Callback function that will be called when clicked on a cluster label.

Parameters

ParameterTypeDescription
indexnumberCluster index for this label.
idstringCluster id for this label.
eventMouseEventCorresponding mouse event.

Returns

void


onGraphRebuilt()?

optional onGraphRebuilt: (stats) => void

Callback function that executes after the graph completes rebuilding with new data.

Parameters

ParameterTypeDescription
stats{ pointsCount: number; linksCount: number; pointsSummary?: Record<string, unknown>[]; linksSummary?: Record<string, unknown>[]; }Graph statistics after rebuilding
stats.pointsCountnumberNumber of rendered points in the graph
stats.linksCountnumberNumber of rendered links in the graph
stats.pointsSummary?Record<string, unknown>[]Summary information for the rendered points
stats.linksSummary?Record<string, unknown>[]Summary information for the rendered links

Returns

void


onGraphRebuildError()?

optional onGraphRebuildError: (error) => void

Callback function that executes when rebuilding the graph fails.

Parameters

ParameterType
errorError

Returns

void


onGraphDataUpdated()?

optional onGraphDataUpdated: () => void

Callback function that will be called when points or links data is replaced or modified at the local database.

Returns

void


onConfigUpdated()?

optional onConfigUpdated: () => void

Callback function that will be called after the config was updated.

Returns

void


onRectSelected()?

optional onRectSelected: (selection, pointIndices?) => void

Callback function that will be called when area selection was performed.

Parameters

ParameterTypeDescription
selection[[number, number], [number, number]] | null— The selected area or null if the selection was cleared.
pointIndices?number[]— Indices of points inside the rect (available synchronously; same as getSelectedPointIndices() after crossfilter applies).

Returns

void


onPolygonSelected()?

optional onPolygonSelected: (polygonPoints) => void

Callback function that will be called when polygonal selection was performed.

Parameters

ParameterTypeDescription
polygonPoints[number, number][]The points of the polygon.

Returns

void