JavaScript & React libraryAPI Generated Docs

Interface: CallbackConfig

Extended by

Properties

onPointsFiltered()?

optional onPointsFiltered: (filteredPoints, selectedPointIndices, selectedLinkIndices) => void

Callback function that will be called when the points was filtered by point crossfilter.

Parameters

ParameterTypeDescription
filteredPointsCosmographDataA Table of filtered points.
selectedPointIndicesnumber[] | null | undefinedArray of selected point indices related to the indices in the internal points table.
selectedLinkIndicesnumber[] | undefinedArray of selected link indices related to the indices in the internal links table.

Returns

void


onLinksFiltered()?

optional onLinksFiltered: (filteredLinks, selectedPointIndices, selectedLinkIndices) => void

Callback function that will be called when the links was filtered by link crossfilter.

Parameters

ParameterTypeDescription
filteredLinksCosmographDataA Table of filtered links.
selectedPointIndicesnumber[] | null | undefinedArray of selected point indices related to the indices in the internal points table.
selectedLinkIndicesnumber[] | undefinedArray of selected link indices related to the indices in the internal links table.

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


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