JavaScript & React libraryAPI

Interface: BasicConfig

Extended by

Properties

enableSimulation?

optional enableSimulation: boolean

Controls whether to disable force-directed layout simulation. If undefined, the simulation will be automatically disabled if there are no links or points have layout coordinates provided.

When disabled (true):

  • Uses x/y values from data for point positions. If positions not provided, random positions will be used.

Default

undefined


rectangularSelectorClassName?

optional rectangularSelectorClassName: string

Specifies the CSS class to use for the rectangular selector.


polygonalSelectorStrokeColor?

optional polygonalSelectorStrokeColor: string

Stroke color for the lasso selection

Default

'#ffffff'

polygonalSelectorLineWidth?

optional polygonalSelectorLineWidth: number

Line width for the lasso selection

Default

2

selectPointOnClick?

optional selectPointOnClick: boolean | "single"

Controls whether to select a clicked point with the connected points.

  • When true: Selects the clicked point and all connected points to it
  • When 'single': Selects only the clicked point
  • Will also focus (render ring around) the clicked point if focusPointOnClick is undefined

selectPointOnLabelClick?

optional selectPointOnLabelClick: boolean | "single"

Controls whether to select a point with the connected points when the point’s label is clicked.

  • When true: Selects the clicked point and all connected points to it
  • When 'single': Selects only the clicked point
  • Will also focus (render ring around) the clicked point if focusPointOnClick is undefined

selectClusterOnLabelClick?

optional selectClusterOnLabelClick: boolean

Controls whether to select points of a cluster when its label is clicked.


focusPointOnClick?

optional focusPointOnClick: boolean

Controls whether to focus on a point when the point itself is clicked.


focusPointOnLabelClick?

optional focusPointOnLabelClick: boolean

Controls whether to focus on a point when the point’s label is clicked.


componentsDisplayStateMode?

optional componentsDisplayStateMode: false | "loading"

Controls display state messages behavior for all Cosmograph components.

  • When undefined: Show all state messages (loading, no data)
  • When 'loading': Show only loading state message, hide no data message
  • When false: Disable all state messages

This will be applied to all components unless explicitly overridden in component-specific configuration.

Default

undefined


statusIndicatorMode?

optional statusIndicatorMode: false | "text" | "spinner"

Chooses which kind of status indicator to show during loading or errors.

  • 'spinner' (default): show a spinner during loading, falling back to text on errors.
  • 'text': always show descriptive messages.
  • false: hide the status indicator entirely.

Default

'spinner'

disableLogging?

optional disableLogging: boolean

Disables logging of Cosmograph messages in the console.

Default

false

preservePointPositionsOnDataUpdate?

optional preservePointPositionsOnDataUpdate: boolean

Preserve positions for points with same ids (pointIdBy) during point data update

When true:

  • Points with same ids will stay where they were instead of generating new positions
  • New points get new positions (or positions from pointXBy/pointYBy if set)
  • Preserved positions take priority over new coordinates from pointXBy/pointYBy for existing points

Default

false