Interface: OutputCosmographDataPrepConfig
Extends
Omit<CosmographConfig,"points"|"links">
Properties
enableSimulation?
optionalenableSimulation: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
Inherited from
Omit.enableSimulation
rectangularSelectorClassName?
optionalrectangularSelectorClassName:string
Specifies the CSS class to use for the rectangular selector.
Inherited from
Omit.rectangularSelectorClassName
polygonalSelectorStrokeColor?
optionalpolygonalSelectorStrokeColor:string
Stroke color for the lasso selection
Default
'#ffffff'Inherited from
Omit.polygonalSelectorStrokeColor
polygonalSelectorLineWidth?
optionalpolygonalSelectorLineWidth:number
Line width for the lasso selection
Default
2Inherited from
Omit.polygonalSelectorLineWidth
selectPointOnClick?
optionalselectPointOnClick: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 
focusPointOnClickisundefined 
Inherited from
Omit.selectPointOnClick
selectPointOnLabelClick?
optionalselectPointOnLabelClick: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 
focusPointOnClickisundefined 
Inherited from
Omit.selectPointOnLabelClick
selectClusterOnLabelClick?
optionalselectClusterOnLabelClick:boolean
Controls whether to select points of a cluster when its label is clicked.
Inherited from
Omit.selectClusterOnLabelClick
focusPointOnClick?
optionalfocusPointOnClick:boolean
Controls whether to focus on a point when the point itself is clicked.
Inherited from
Omit.focusPointOnClick
focusPointOnLabelClick?
optionalfocusPointOnLabelClick:boolean
Controls whether to focus on a point when the pointās label is clicked.
Inherited from
Omit.focusPointOnLabelClick
componentsDisplayStateMode?
optionalcomponentsDisplayStateMode: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
Inherited from
Omit.componentsDisplayStateMode
statusIndicatorMode?
optionalstatusIndicatorMode: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'Inherited from
Omit.statusIndicatorMode
disableLogging?
optionaldisableLogging:boolean
Disables logging of Cosmograph messages in the console.
Default
falseInherited from
Omit.disableLogging
preservePointPositionsOnDataUpdate?
optionalpreservePointPositionsOnDataUpdate: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/pointYByif set) - Preserved positions take priority over new coordinates from 
pointXBy/pointYByfor existing points 
Default
falseInherited from
Omit.preservePointPositionsOnDataUpdate
onPointsFiltered()?
optionalonPointsFiltered: (filteredPoints) =>void
Callback function that will be called when the points was filtered by point crossfilter.
Parameters
| Parameter | Type | Description | 
|---|---|---|
filteredPoints | CosmographData | A Table of filtered points. | 
Returns
void
Inherited from
Omit.onPointsFiltered
onLinksFiltered()?
optionalonLinksFiltered: (filteredLinks) =>void
Callback function that will be called when the links was filtered by link crossfilter.
Parameters
| Parameter | Type | Description | 
|---|---|---|
filteredLinks | CosmographData | A Table of filtered links. | 
Returns
void
Inherited from
Omit.onLinksFiltered
onLabelClick()?
optionalonLabelClick: (index,id,event) =>void
Callback function that will be called when clicked on a label.
Parameters
| Parameter | Type | Description | 
|---|---|---|
index | number | Point index for this label. | 
id | string | Point id for this label. | 
event | MouseEvent | Corresponding mouse event. | 
Returns
void
Inherited from
Omit.onLabelClick
onClusterLabelClick()?
optionalonClusterLabelClick: (index,id,event) =>void
Callback function that will be called when clicked on a cluster label.
Parameters
| Parameter | Type | Description | 
|---|---|---|
index | number | Cluster index for this label. | 
id | string | Cluster id for this label. | 
event | MouseEvent | Corresponding mouse event. | 
Returns
void
Inherited from
Omit.onClusterLabelClick
onGraphRebuilt()?
optionalonGraphRebuilt: (stats) =>void
Callback function that executes after the graph completes rebuilding with new data.
Parameters
| Parameter | Type | Description | 
|---|---|---|
stats | { pointsCount: number; linksCount: number; pointsSummary?: Record<string, unknown>[]; linksSummary?: Record<string, unknown>[]; } | Graph statistics after rebuilding | 
stats.pointsCount | number | Number of rendered points in the graph | 
stats.linksCount | number | Number 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
Inherited from
Omit.onGraphRebuilt
onGraphDataUpdated()?
optionalonGraphDataUpdated: () =>void
Callback function that will be called when points or links data is replaced or modified at the local database.
Returns
void
Inherited from
Omit.onGraphDataUpdated
onConfigUpdated()?
optionalonConfigUpdated: () =>void
Callback function that will be called after the config was updated.
Returns
void
Inherited from
Omit.onConfigUpdated
onRectSelected()?
optionalonRectSelected: (selection) =>void
Callback function that will be called when area selection was performed.
Parameters
| Parameter | Type | Description | 
|---|---|---|
selection | null | [[number, number], [number, number]] | ā The selected area or null if the selection was cleared. | 
Returns
void
Inherited from
Omit.onRectSelected
onPolygonSelected()?
optionalonPolygonSelected: (polygonPoints) =>void
Callback function that will be called when polygonal selection was performed.
Parameters
| Parameter | Type | Description | 
|---|---|---|
polygonPoints | [number, number][] | The points of the polygon. | 
Returns
void
Inherited from
Omit.onPolygonSelected
pointIdBy?
optionalpointIdBy:string
Unique identifier column for each point. Required for mapping links to points correctly.
Inherited from
Omit.pointIdBy
pointIndexBy?
optionalpointIndexBy:string
Numeric index column for each point. Used for efficient lookups and should be a sequential integer starting from 0.
Inherited from
Omit.pointIndexBy
pointColorBy?
optionalpointColorBy:string
The column name for the point color. If provided, points will be colored based on the values in this column, which should be either a color string or an array of numeric [r, g, b, a] values.
Inherited from
Omit.pointColorBy
pointColorByFn?
optionalpointColorByFn:ColorAccessorFn<number> |ColorAccessorFn<string> |ColorAccessorFn<boolean> |ColorAccessorFn<unknown>
Specifies the function that will be used to generate the color for each point based on the value in the pointColorBy column. It takes a point record as input and its index, and should return a color string or an array of [r, g, b, a] values.
Overrides the values in pointColorBy column by processing them (in this case the values in the pointColorBy column can be of any type, not just colors).
Has effect only when pointColorBy is provided and pointColorStrategy is undefined.
See
Returns
The color as a string or an array of [r, g, b, a] value to be applied to the point.
Example
// Color points based on a value of the `pointColorBy` column
pointColorByFn: (value: number) => value > 10 ? 'red' : '#00ff00'
 
// Color points based on the index of the point
pointColorByFn: (value: number, index: number) => index % 2 === 0 ? 'red' : '#00ff00'
 
// Color points using RGBA values
pointColorByFn: (value: unknown) => [255, 0, 0, 1]Inherited from
Omit.pointColorByFn
pointColorPalette?
optionalpointColorPalette:string[]
An optional array of color strings that can be used to color the points in the visualization. If provided, the points will be colored using the colors in this palette, cycling through the array as needed.
Used when pointColorStrategy is set to 'palette', 'interpolatePalette', or 'degree'.`
Inherited from
Omit.pointColorPalette
pointColorByMap?
optionalpointColorByMap:Record<string,string| [number,number,number,number]>
An optional mapping of values to colors for the points in the visualization. The keys in the map should be string and the values can be either color strings or arrays of RGBA values.
Used when pointColorStrategy is set to 'map'.
Default
undefined
Example
pointColorByMap: {
  'active': '#ff0000', // string key with hex color
  '42': [255, 0, 0, 1], // number key with RGBA array
  'true': 'red'  // boolean key with css-valid color
}Inherited from
Omit.pointColorByMap
pointColorStrategy?
optionalpointColorStrategy:string
Specifies the strategy for coloring points based on data from the pointColorBy column. Available strategies:
undefined (default):
Will automatically use the optimal strategy based on the input configuration and color data type. Current strategy can be acquired with Cosmograph.activePointColorStrategy getter.
'palette'
Uses colors from pointColorPalette without interpolation.
- For numeric data: Creates equal-width buckets mapped to pointColorPalette colors
 - For categorical data: Assigns colors from pointColorPalette in order, cycling when unique values exceed palette length
 
'interpolatePalette'
Interpolates colors from pointColorPalette.
- For numeric data: Creates continuous color scale between pointColorPalette colors
 - For categorical data: Creates evenly-spaced color scale by interpolating between pointColorPalette colors to match the number of unique values in pointColorBy so every value is a unique color
 
'map'
Uses color mapping from pointColorByMap to values in pointColorBy.
- Applies exact color from pointColorByMap for matching values
 - Falls back to pointColor when value is not found in map or invalid
 
'degree'
Colors points based on their degree (number of connections) using interpolated pointColorPalette with quantile-based boundaries.
- Maps point degrees to continuous color scale between pointColorPalette colors
 - Has effect only if links provided
 
'direct'
Directly uses pointColorBy column values as colors.
- Applies the color if itās a valid color string (hex, rgb, named color, etc) or an array of 
[r, g, b, a] - If pointColorByFn exists, applies it to transform pointColorBy values into custom colors with it
 - Falls back to pointColor if invalid color
 - If neither pointColorBy nor pointColorByFn exist, colors all points with pointColor
 
Inherited from
Omit.pointColorStrategy
pointSizeBy?
optionalpointSizeBy:string
The column name that should contain numeric values to be used for the point size and label weight (if labels enabled). If provided, points will be sized based on the values in this column.
Inherited from
Omit.pointSizeBy
pointSizeStrategy?
optionalpointSizeStrategy:string
Specifies the strategy for sizing points based on data from the pointSizeBy column. Available strategies:
undefined (default):
Will automatically use the optimal strategy based on the input configuration and size data type. Current strategy can be acquired with Cosmograph.activePointSizeStrategy getter.
'auto'
Automatically sizes points using symmetric log scaling with quantile-based data boundaries based on the pointSizeBy data. Uses pointSizeRange to determine the min/max size range.
- Has effect only if pointSizeBy provided and contains numeric data.
 
direct:
Directly uses pointSizeBy column values as point sizes.
- If pointSizeByFn exists, applies it to transform pointSizeBy values into custom sizes with it
 - Falls back to pointSize if invalid size
 - If neither pointSizeBy nor pointSizeByFn exist, sizes all points with pointSize
 
'degree'
Sizes points based on their degree (number of connections) with quantile-based boundaries and the min/max from pointSizeRange.
- Has effect only if links provided
 
Inherited from
Omit.pointSizeStrategy
pointSizeRange?
optionalpointSizeRange: [number,number]
Defines the range for automatic point size scaling. Takes [min, max] values in pixels.
When pointSizeBy column contains numeric values, they will be automatically remapped to fit within this range to prevent oversized points.
Used when pointSizeStrategy is set to 'auto' or 'degree'.
Default
[2, 9]
Inherited from
Omit.pointSizeRange
pointSizeByFn?
optionalpointSizeByFn:SizeAccessorFn<number> |SizeAccessorFn<string> |SizeAccessorFn<boolean> |SizeAccessorFn<unknown>
Function that generates sizes for points based on values in the pointSizeBy column.
Overrides the values in pointSizeBy column by processing them (values can be of any type, not just numbers).
Has effect only when pointSizeBy is provided and pointSizeStrategy is undefined.
See
Example
// Size points based on a value of the `pointSizeBy` column
pointSizeByFn: (value: boolean) => value ? 8 : 4
 
// Size points based on the index
pointSizeByFn: (value: unknown, index: number) => index % 2 === 0 ? 8 : 4
 
// Size points using a calculation
pointSizeByFn: (value: number) => Math.min(value * 2, 10)Inherited from
Omit.pointSizeByFn
pointClusterBy?
optionalpointClusterBy:string
Column name containing cluster assignments for points. Can be string or number.
Remarks
Cosmograph will automatically generate a mapping of cluster values to their indices that will be available in the clusterMapping getter.
Inherited from
Omit.pointClusterBy
pointClusterByFn()?
optionalpointClusterByFn: (value,index?) =>unknown
Function that generates cluster assignments for points based on values in the pointClusterBy column.
Overrides the values in pointClusterBy column by processing them.
Has effect only when pointClusterBy is provided.
Parameters
| Parameter | Type | 
|---|---|
value | any | 
index? | number | 
Returns
unknown
Example
pointClusterByFn: (value: string) => value.lengthInherited from
Omit.pointClusterByFn
pointClusterStrengthBy?
optionalpointClusterStrengthBy:string
The pointClusterStrengthBy column defines how strongly each point is attracted to its assigned cluster during the simulation.
The column should contain numeric values where higher values (closer to 1.0) = stronger attraction, point stays closer to its cluster, Lower values (closer to 0.0) = weaker attraction, point can move more freely away from its cluster
Has effect only when pointClusterBy is provided.
Inherited from
Omit.pointClusterStrengthBy
pointLabelBy?
optionalpointLabelBy:string
The column name for the point label.
Inherited from
Omit.pointLabelBy
pointLabelWeightBy?
optionalpointLabelWeightBy:string
Specify the numeric column that will be used for the point label weight. Higher weight values make labels more likely to be shown.
If not provided, the points labels will be sorted by pointSizeBy if provided or their total links count (degree) otherwise .
Inherited from
Omit.pointLabelWeightBy
pointXBy?
optionalpointXBy:string
The column name for the pointās x-coordinate.
If provided with pointYBy, points will be positioned based on the values from pointXBy and pointYBy columns.
Inherited from
Omit.pointXBy
pointYBy?
optionalpointYBy:string
The column name for the pointās y-coordinate.
If provided with pointXBy, points will be positioned based on the values from pointXBy and pointYBy columns.
Inherited from
Omit.pointYBy
pointIncludeColumns?
optionalpointIncludeColumns:string[]
An array of additional column names to include in the point data.
These columns will be available on the point objects but not used by Cosmograph directly, can be used as accessors for Cosmograph comopnents. Useful for storing additional information about the points.
Inherited from
Omit.pointIncludeColumns
linkSourceBy?
optionallinkSourceBy:string
The column name for the source point of each link. This should match the pointIdBy values in the points data.
Inherited from
Omit.linkSourceBy
linkSourceIndexBy?
optionallinkSourceIndexBy:string
The column name for the index of the source point of each link.
This is used for efficient lookups and should match the pointIndexBy values in the points data.
Inherited from
Omit.linkSourceIndexBy
linkTargetBy?
optionallinkTargetBy:string
The column name for the target point of each link. This should match the pointIdBy values in the points data.
Inherited from
Omit.linkTargetBy
linkTargetIndexBy?
optionallinkTargetIndexBy:string
The column name for the index of the target point of each link.
This is used for efficient lookups and should match the pointIndexBy values in the points data.
Inherited from
Omit.linkTargetIndexBy
linkColorBy?
optionallinkColorBy:string
The column name for the link color.
If provided, links will be colored based on the values in this column, which should be either a color string or an array of numeric [r, g, b, a] values.
Inherited from
Omit.linkColorBy
linkColorByFn?
optionallinkColorByFn:ColorAccessorFn<number> |ColorAccessorFn<string> |ColorAccessorFn<boolean> |ColorAccessorFn<unknown>
Specifies the function that will be used to generate the color for each link based on the value in the linkColorBy column.
It takes a link record as input and its index, and should return a color string or an array of [r, g, b, a] values.
Works only when linkColorBy is provided. Overrides the values in linkColorBy column by processing them (in this case the values in the linkColorBy column can be of any type, not just colors).
Param
The value from the LinkColor column.
Param
The index of the link.
Returns
The color as a string or an array of [r, g, b, a] value to be applied to the link.
Inherited from
Omit.linkColorByFn
linkWidthBy?
optionallinkWidthBy:string
The column name for the link width.
If provided, links will have their widths set based on the values in this column, which should be numeric values.
Inherited from
Omit.linkWidthBy
linkWidthRange?
optionallinkWidthRange: [number,number]
Defines the range for automatic link width scaling. Takes [min, max] values in pixels.
When linkWidthBy column contains numeric values, they will be automatically remapped to fit within this range to prevent oversized links if no linkWidthByFn provided.
Note: Only works when linkWidthBy column is provided and contains numeric values and when linkWidthByFn is not set.
Default
[1, 9]Inherited from
Omit.linkWidthRange
linkWidthByFn?
optionallinkWidthByFn:SizeAccessorFn<number> |SizeAccessorFn<string> |SizeAccessorFn<boolean> |SizeAccessorFn<unknown>
Specifies the function that will be used to generate the width for each link based on the value in the linkWidthBy column.
It takes a link record as input and its index, and should return a numeric value.
Works only when linkWidthBy is provided. Overrides the values in the linkWidthBy column by processing them (in this case the values in the linkWidthBy column can be of any type, not just numbers).
Param
The value from the LinkWidth column.
Param
The index of the link.
Returns
The numeric width value to be applied to the link.
Inherited from
Omit.linkWidthByFn
linkArrowBy?
optionallinkArrowBy:string
The column name that determines whether a link should have an arrow.
If provided, links will have arrows based on the boolean values in this column.
Inherited from
Omit.linkArrowBy
linkArrowByFn?
optionallinkArrowByFn:BooleanAccessorFn<string> |BooleanAccessorFn<number> |BooleanAccessorFn<unknown>
Specifies the function that determines if a link should have an arrow based on the value in the linkArrowBy column.
It takes a link record as input and its index, and should return a boolean value.
Works only when linkArrowBy is provided. Overrides the values in the linkArrowBy column by processing them (in this case the values in the linkArrowBy column can be of any type, not just booleans).
Param
The value from the LinkArrow column.
Param
The index of the link.
Returns
A boolean indicating whether the link should have an arrow.
Inherited from
Omit.linkArrowByFn
linkStrengthBy?
optionallinkStrengthBy:string
The column name for the link strength. If provided, links will have their strengths set based on the values in this column, which should be numeric values. Link strength affects the force simulation.
Inherited from
Omit.linkStrengthBy
linkStrengthByFn?
optionallinkStrengthByFn:SizeAccessorFn<number> |SizeAccessorFn<string> |SizeAccessorFn<boolean> |SizeAccessorFn<unknown>
Specifies the function that will be used to generate the strength for each link based on the value in the linkStrengthBy column.
It takes a link record as input and its index, and should return a numeric value.
Works only when linkStrengthBy is provided. Overrides the values in the linkStrengthBy column by processing them (in this case the values in the linkStrengthBy column can be of any type, not just numbers).
Param
The value from the LinkStrength column.
Param
The index of the link.
Returns
The numeric strength value to be applied to the link.
Inherited from
Omit.linkStrengthByFn
linkStrengthRange?
optionallinkStrengthRange: [number,number]
Defines the range for automatic link strength scaling. Takes [min, max] values in the range [0, 1].
This setting can be used to control the strength of the links during the simulation.
Note: Only works when linkStrength column is provided and contains numeric values and when linkStrengthFn is not set. Has effect only during the active simulation.
Default
[0.2, 1.0]Inherited from
Omit.linkStrengthRange
linkIncludeColumns?
optionallinkIncludeColumns:string[]
An array of additional column names to include in the link data.
These columns will be available on the link objects but not used by Cosmograph directly, can be used as accessors for Cosmograph components. Useful for storing additional information about the links.
Inherited from
Omit.linkIncludeColumns
clusterPositionsMap?
optionalclusterPositionsMap:Record<string, [number,number]>
Mapping of cluster keys to [x, y] coordinate positions. Keys should match values from the pointClusterBy column. Missing cluster keys will be automatically positioned using the centermass. Wonāt take effect if point positions are provided by pointXBy or pointYBy.
Example
// Object mapping cluster keys to coordinates:
clusterPositionsMap: {
  'Rock': [10, 20],    // Cluster 'Rock' at position (10, 20)
  'Rap': [30, 40],     // Cluster 'Rap' at position (30, 40)
}Remarks
If pointClusterByFn is provided, use keys as values of pointClusterBy after applying pointClusterByFn.
Inherited from
Omit.clusterPositionsMap
showLabels?
optionalshowLabels:boolean
Whether to show labels (except hovered) on the Cosmograph canvas. When true, labels are visible only if pointLabelBy is provided.
Default: false
Inherited from
Omit.showLabels
showDynamicLabels?
optionalshowDynamicLabels:boolean
Show automatic labels for the evenly distributed points that are currently visible on the screen.
Works only when pointLabelBy is provided.
Default: true
Inherited from
Omit.showDynamicLabels
showLabelsFor?
optionalshowLabelsFor:string[]
An array of point ids to show labels for.
Works only when pointLabelBy is provided.
Default: undefined
Inherited from
Omit.showLabelsFor
showTopLabels?
optionalshowTopLabels:boolean
Show labels for the top points.
Works only when pointLabelBy is provided.
Default: true
Inherited from
Omit.showTopLabels
showTopLabelsLimit?
optionalshowTopLabelsLimit:number
Sets the maximum number of top points to show labels for.
Default: 30
Inherited from
Omit.showTopLabelsLimit
showClusterLabels?
optionalshowClusterLabels:boolean
Show labels for the clusters based on the pointClusterBy column. When any point is selected, cluster labels will be hidden until the selection is cleared.
Has effect only when pointClusterBy is provided.
Default: false
Inherited from
Omit.showClusterLabels
pointLabelColor?
optionalpointLabelColor:string
Specifies the CSS color to use for the point labels.
If undefined, label will be colored as point.
Inherited from
Omit.pointLabelColor
pointLabelFontSize?
optionalpointLabelFontSize:number
Specifies the font size to use for the point labels.
@default: 13
Inherited from
Omit.pointLabelFontSize
clusterLabelFontSize?
optionalclusterLabelFontSize:number
Specifies the font size to use for the cluster labels.
@default: 16
Inherited from
Omit.clusterLabelFontSize
clusterLabelClassName?
optionalclusterLabelClassName:string| (text,clusterIndex) =>string
Specifies the CSS class to use for the cluster labels.
Param
The text of the label.
Param
The index of the cluster.
Returns
The CSS class/string to be applied to the cluster label.
@default: 'background: #35374887; font-weight: 300; opacity: 0.9;'
Inherited from
Omit.clusterLabelClassName
scaleClusterLabels?
optionalscaleClusterLabels:boolean
Whether to scale the cluster labels based on the number of points in the cluster.
Default: true
Inherited from
Omit.scaleClusterLabels
usePointColorStrategyForClusterLabels?
optionalusePointColorStrategyForClusterLabels:boolean
If true, cluster labels will acquire colors from the current point coloring strategy (pointColorStrategy).
This can be useful when pointClusterBy and pointColorBy refer to the same data.
Default: false
Inherited from
Omit.usePointColorStrategyForClusterLabels
pointLabelFn()?
optionalpointLabelFn: (value,index?) =>string
Specifies the function that will be used to generate the labels based on pointLabelBy column. It should return a string.
Works only when pointLabelBy is provided. Overrides the values specified in pointLabelBy column by processing them.
Parameters
| Parameter | Type | Description | 
|---|---|---|
value | unknown | The value from the pointLabelBy column. | 
index? | number | The index of the point. | 
Returns
string
Text of label.
Inherited from
Omit.pointLabelFn
pointLabelWeightFn()?
optionalpointLabelWeightFn: (value,index?) =>number
Specifies the function that will be used to generate the label weights. Should return a number between 0 and 1.
Works only when pointLabelWeightBy is provided. Overrides the values specified in pointLabelWeightBy column by processing them.
Parameters
| Parameter | Type | Description | 
|---|---|---|
value | unknown | Value from the pointLabelWeightBy column. | 
index? | number | Index of the point. | 
Returns
number
Label weight value to be applied to the point label.
Inherited from
Omit.pointLabelWeightFn
pointLabelClassName?
optionalpointLabelClassName:string| (text,pointIndexBy,pointIdBy?) =>string
Specifies the CSS class to use for the point labels. This can either be a string specifying a fixed CSS class name or a function that returns a CSS class name based on the point index and optional point ID.
Remarks
When provided as a function, accepts:
Param
The text of the label.
Param
The index of the point.
Param
The optional ID of the point.
Returns
CSS class name to be applied to the point label.
Inherited from
Omit.pointLabelClassName
staticLabelWeight?
optionalstaticLabelWeight:number
Specifies the weight of the static labels.
Default: 0.8
Inherited from
Omit.staticLabelWeight
dynamicLabelWeight?
optionaldynamicLabelWeight:number
Specifies the weight of the dynamic labels.
Default: 0.7
Inherited from
Omit.dynamicLabelWeight
labelMargin?
optionallabelMargin:number
Specifies the margin between the label and the point.
Default: 5
Inherited from
Omit.labelMargin
labelPadding?
optionallabelPadding: [number,number,number,number]
Specifies the [left, top, right, bottom] padding of the label element.
Default: [6.5, 4.5, 6.5, 4.5]
Inherited from
Omit.labelPadding
customLabels?
optionalcustomLabels:CosmographCustomLabel[]
Specifies an array of custom labels to be displayed on the Cosmograph canvas.
Each custom label is defined by the CosmographCustomLabel type, which includes properties for the label text, position, weight and optional CSS class.
Inherited from
Omit.customLabels
showFocusedPointLabel?
optionalshowFocusedPointLabel:boolean
Controls whether to show the label for the focused point.
Inherited from
Omit.showFocusedPointLabel
showHoveredPointLabel?
optionalshowHoveredPointLabel:boolean
Whether to show a hovered point label.
Default: false
Inherited from
Omit.showHoveredPointLabel
hoveredPointLabelClassName?
optionalhoveredPointLabelClassName:string| (text,pointIndexBy,pointIdBy?) =>string
Specifies the CSS class to use for the hovered point label. This can either be a string specifying a fixed CSS class name or a function that returns a CSS class name based on the point index and optional point ID.
Param
The index of the point.
Param
The optional ID of the point.
Returns
The CSS class to be applied to the point label.
Inherited from
Omit.hoveredPointLabelClassName
simulationDecay?
optionalsimulationDecay:number
Decay coefficient. Use bigger values if you want the simulation to ācool downā slower.
Default value: 5000
Inherited from
Omit.simulationDecay
simulationGravity?
optionalsimulationGravity:number
Gravity force coefficient.
Default value: 0.25
Inherited from
Omit.simulationGravity
simulationCenter?
optionalsimulationCenter:number
Centering to center mass force coefficient.
Default value: 0
Inherited from
Omit.simulationCenter
simulationRepulsion?
optionalsimulationRepulsion:number
Repulsion force coefficient.
Default value: 1.0
Inherited from
Omit.simulationRepulsion
simulationRepulsionTheta?
optionalsimulationRepulsionTheta:number
Decreases / increases the detalization of the Many-Body force calculations.
When useClassicQuadtree is set to true, this property corresponds to the BarnesāHut approximation criterion.
Default value: 1.15
Inherited from
Omit.simulationRepulsionTheta
simulationRepulsionQuadtreeLevels?
optionalsimulationRepulsionQuadtreeLevels:number
BarnesāHut approximation depth.
Can only be used when useClassicQuadtree is set true.
Default value: 12
Inherited from
Omit.simulationRepulsionQuadtreeLevels
simulationLinkSpring?
optionalsimulationLinkSpring:number
Link spring force coefficient.
Default value: 1
Inherited from
Omit.simulationLinkSpring
simulationLinkDistance?
optionalsimulationLinkDistance:number
Minimum link distance.
Default value: 10
Inherited from
Omit.simulationLinkDistance
simulationLinkDistRandomVariationRange?
optionalsimulationLinkDistRandomVariationRange:number[]
Range of random link distance values.
Default value: [1, 1.2]
Inherited from
Omit.simulationLinkDistRandomVariationRange
simulationRepulsionFromMouse?
optionalsimulationRepulsionFromMouse:number
Repulsion coefficient from mouse position.
The repulsion force is activated by pressing the right mouse button.
Default value: 2
Inherited from
Omit.simulationRepulsionFromMouse
simulationFriction?
optionalsimulationFriction:number
Friction coefficient.
Default value: 0.85
Inherited from
Omit.simulationFriction
simulationClusterStrength?
optionalsimulationClusterStrength:number
Coefficient of simulation cluster strength from 0 to 1. If undefined, the graph will not apply any clustering force to the simulation.
Default value: undefined.
Inherited from
Omit.simulationClusterStrength
simulationImpulse?
optionalsimulationImpulse:number
Coefficient of simulation impulse from 0 to 1. If undefined, the graph will not apply a new impulse to the renders during adding or removing data items, but instead will use the current simulation impulse value from the graph. Has no impact if enableSimulation is false.
Default value: undefined.
Inherited from
Omit.simulationImpulse
onSimulationStart()?
optionalonSimulationStart: () =>void
Callback function that will be called when the simulation starts.
Returns
void
Inherited from
Omit.onSimulationStart
onSimulationEnd()?
optionalonSimulationEnd: () =>void
Callback function that will be called when the simulation stops.
Returns
void
Inherited from
Omit.onSimulationEnd
onSimulationPause()?
optionalonSimulationPause: () =>void
Callback function that will be called when the simulation is paused.
Returns
void
Inherited from
Omit.onSimulationPause
onSimulationRestart()?
optionalonSimulationRestart: () =>void
Callback function that will be called when the simulation is restarted.
Returns
void
Inherited from
Omit.onSimulationRestart
onSimulationTick()?
optionalonSimulationTick: (alpha,hoveredIndex?,pointPosition?) =>void
Callback function that will be called on every tick of the simulation.
Parameters
| Parameter | Type | 
|---|---|
alpha | number | 
hoveredIndex? | number | 
pointPosition? | [number, number] | 
Returns
void
Inherited from
Omit.onSimulationTick
backgroundColor?
optionalbackgroundColor:string| [number,number,number,number]
Canvas background color. Can be either a hex color string (e.g., ā#b3b3b3ā) or an array of RGBA values. Default value: ā#222222ā
Inherited from
Omit.backgroundColor
spaceSize?
optionalspaceSize:number
Simulation space size (max 8192).
Default value: 8192
Inherited from
Omit.spaceSize
pointColor?
optionalpointColor:string| [number,number,number,number]
The default color to use for points when no point colors are provided,
or if the color value in the array is undefined or null.
This can be either a hex color string (e.g., ā#b3b3b3ā) or an array of RGBA values
in the format [red, green, blue, alpha] where each value is a number between 0 and 255.
Default value: ā#b3b3b3ā
Inherited from
Omit.pointColor
pointGreyoutColor?
optionalpointGreyoutColor:string| [number,number,number,number]
The color to use for points when they are greyed out (when selection is active).
This can be either a hex color string (e.g., ā#b3b3b3ā) or an array of RGBA values
in the format [red, green, blue, alpha] where each value is a number between 0 and 255.
If not provided, the color will be the same as the pointColor,
but darkened or lightened depending on the background color.
If pointGreyoutOpacity is also defined, it will override the alpha/opacity component
of this color.
Default value: undefined
Inherited from
Omit.pointGreyoutColor
pointGreyoutOpacity?
optionalpointGreyoutOpacity:number
Opacity value for points when they are greyed out (when selection is active). Values range from 0 (completely transparent) to 1 (fully opaque).
If defined, this value will override the alpha/opacity component of pointGreyoutColor.
Default value: undefined
Inherited from
Omit.pointGreyoutOpacity
pointSize?
optionalpointSize:number
The default size value to use for points when no point sizes are provided or
if the size value in the array is undefined or null.
Default value: 4
Inherited from
Omit.pointSize
pointOpacity?
optionalpointOpacity:number
Universal opacity value applied to all points.
This value multiplies with individual point alpha values (if set via setPointColors).
Useful for dynamically controlling opacity of all points without updating individual RGBA arrays.
Default value: 1.0
Inherited from
Omit.pointOpacity
pointSizeScale?
optionalpointSizeScale:number
Scale factor for the point size.
Default value: 1
Inherited from
Omit.pointSizeScale
hoveredPointCursor?
optionalhoveredPointCursor:string
Cursor style to use when hovering over a point
Default value: auto
Inherited from
Omit.hoveredPointCursor
renderHoveredPointRing?
optionalrenderHoveredPointRing:boolean
Turns ring rendering around a point on hover on / off
Default value: false
Inherited from
Omit.renderHoveredPointRing
hoveredPointRingColor?
optionalhoveredPointRingColor:string| [number,number,number,number]
Hovered point ring color hex value.
Can be either a hex color string (e.g., ā#b3b3b3ā) or an array of RGBA values.
Default value: white
Inherited from
Omit.hoveredPointRingColor
focusedPointRingColor?
optionalfocusedPointRingColor:string| [number,number,number,number]
Focused point ring color hex value.
Can be either a hex color string (e.g., ā#b3b3b3ā) or an array of RGBA values.
Default value: white
Inherited from
Omit.focusedPointRingColor
focusedPointIndex?
optionalfocusedPointIndex:number
Set focus on a point by index.  A ring will be highlighted around the focused point.
When set to undefined, no point is focused.
Default value: undefined
Inherited from
Omit.focusedPointIndex
renderLinks?
optionalrenderLinks:boolean
Turns link rendering on / off.
Default value: true
Inherited from
Omit.renderLinks
linkColor?
optionallinkColor:string| [number,number,number,number]
The default color to use for links when no link colors are provided,
or if the color value in the array is undefined or null.
This can be either a hex color string (e.g., ā#666666ā) or an array of RGBA values
in the format [red, green, blue, alpha] where each value is a number between 0 and 255.
Default value: ā#666666ā
Inherited from
Omit.linkColor
linkOpacity?
optionallinkOpacity:number
Universal opacity value applied to all links.
This value multiplies with individual link alpha values (if set via setLinkColors).
Useful for dynamically controlling opacity of all links without updating individual RGBA arrays.
Default value: 1.0
Inherited from
Omit.linkOpacity
linkGreyoutOpacity?
optionallinkGreyoutOpacity:number
Greyed out link opacity value when the selection is active.
Default value: 0.1
Inherited from
Omit.linkGreyoutOpacity
linkWidth?
optionallinkWidth:number
The default width value to use for links when no link widths are provided or if the width value in the array is undefined or null.
Default value: 1
Inherited from
Omit.linkWidth
linkWidthScale?
optionallinkWidthScale:number
Scale factor for the link width.
Default value: 1
Inherited from
Omit.linkWidthScale
scaleLinksOnZoom?
optionalscaleLinksOnZoom:boolean
Increase or decrease the size of the links when zooming in or out.
Default value: false
Inherited from
Omit.scaleLinksOnZoom
curvedLinks?
optionalcurvedLinks:boolean
If set to true, links are rendered as curved lines.
Otherwise as straight lines.
Default value: false
Inherited from
Omit.curvedLinks
curvedLinkSegments?
optionalcurvedLinkSegments:number
Number of segments in a curved line.
Default value: 19.
Inherited from
Omit.curvedLinkSegments
curvedLinkWeight?
optionalcurvedLinkWeight:number
Weight affects the shape of the curve.
Default value: 0.8.
Inherited from
Omit.curvedLinkWeight
curvedLinkControlPointDistance?
optionalcurvedLinkControlPointDistance:number
Defines the position of the control point of the curve on the normal from the centre of the line.
If set to 1 then the control point is at a distance equal to the length of the line.
Default value: 0.5
Inherited from
Omit.curvedLinkControlPointDistance
linkArrows?
optionallinkArrows:boolean
The default link arrow value that controls whether or not to display link arrows.
Default value: false
Inherited from
Omit.linkArrows
linkArrowsSizeScale?
optionallinkArrowsSizeScale:number
Scale factor for the link arrows size.
Default value: 1
Inherited from
Omit.linkArrowsSizeScale
linkVisibilityDistanceRange?
optionallinkVisibilityDistanceRange:number[]
The range defines the minimum and maximum link visibility distance in pixels.
The link will be fully opaque when its length is less than the first number in the array,
and will have linkVisibilityMinTransparency transparency when its length is greater than
the second number in the array.
This distance is defined in screen space coordinates and will change as you zoom in and out
(e.g. links become longer when you zoom in, and shorter when you zoom out).
Default value: [50, 150]
Inherited from
Omit.linkVisibilityDistanceRange
linkVisibilityMinTransparency?
optionallinkVisibilityMinTransparency:number
The transparency value that the link will have when its length reaches
the maximum link distance value from linkVisibilityDistanceRange.
Default value: 0.25
Inherited from
Omit.linkVisibilityMinTransparency
useClassicQuadtree?
optionaluseClassicQuadtree:boolean
Use the classic quadtree algorithm for the Many-Body force.
This property will be applied only on component initialization and it
canāt be changed using the setConfig method.
Default value: false
Inherited from
Omit.useClassicQuadtree
enableRightClickRepulsion?
optionalenableRightClickRepulsion:boolean
Enable or disable the repulsion force from mouse when right-clicking.
When set to true, holding the right mouse button will activate the mouse repulsion force.
When set to false, right-clicking will not trigger any repulsion force.
Default value: false
Inherited from
Omit.enableRightClickRepulsion
simulationCluster?
optionalsimulationCluster:number
Cluster coefficient.
Default value: 0.1
Inherited from
Omit.simulationCluster
onClick()?
optionalonClick: (index,pointPosition,event) =>void
Callback function that will be called on every canvas click.
If clicked on a point, its index will be passed as the first argument,
position as the second argument and the corresponding mouse event as the third argument:
(index: number | undefined, pointPosition: [number, number] | undefined, event: MouseEvent) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
index | undefined | number | 
pointPosition | undefined | [number, number] | 
event | MouseEvent | 
Returns
void
Inherited from
Omit.onClick
onMouseMove()?
optionalonMouseMove: (index,pointPosition,event) =>void
Callback function that will be called when mouse movement happens.
If the mouse moves over a point, its index will be passed as the first argument,
position as the second argument and the corresponding mouse event as the third argument:
(index: number | undefined, pointPosition: [number, number] | undefined, event: MouseEvent) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
index | undefined | number | 
pointPosition | undefined | [number, number] | 
event | MouseEvent | 
Returns
void
Inherited from
Omit.onMouseMove
onPointMouseOver()?
optionalonPointMouseOver: (index,pointPosition,event) =>void
Callback function that will be called when a point appears under the mouse
as a result of a mouse event, zooming and panning, or movement of points.
The point index will be passed as the first argument, position as the second argument
and the corresponding mouse event or D3ās zoom event as the third argument:
(index: number, pointPosition: [number, number], event: MouseEvent | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | D3ZoomEvent<HTMLCanvasElement, undefined> | undefined) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
index | number | 
pointPosition | [number, number] | 
event | any | 
Returns
void
Inherited from
Omit.onPointMouseOver
onPointMouseOut()?
optionalonPointMouseOut: (event) =>void
Callback function that will be called when a point is no longer underneath
the mouse pointer because of a mouse event, zoom/pan event, or movement of points.
The corresponding mouse event or D3ās zoom event will be passed as the first argument:
(event: MouseEvent | D3ZoomEvent<HTMLCanvasElement, undefined> | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | undefined) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
event | any | 
Returns
void
Inherited from
Omit.onPointMouseOut
onZoomStart()?
optionalonZoomStart: (e,userDriven) =>void
Callback function that will be called when zooming or panning starts.
First argument is a D3 Zoom Event and second indicates whether
the event has been initiated by a user interaction (e.g. a mouse event):
(event: D3ZoomEvent, userDriven: boolean) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3ZoomEvent<HTMLCanvasElement, undefined> | 
userDriven | boolean | 
Returns
void
Inherited from
Omit.onZoomStart
onZoom()?
optionalonZoom: (e,userDriven) =>void
Callback function that will be called continuously during zooming or panning.
First argument is a D3 Zoom Event and second indicates whether
the event has been initiated by a user interaction (e.g. a mouse event):
(event: D3ZoomEvent, userDriven: boolean) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3ZoomEvent<HTMLCanvasElement, undefined> | 
userDriven | boolean | 
Returns
void
Inherited from
Omit.onZoom
onZoomEnd()?
optionalonZoomEnd: (e,userDriven) =>void
Callback function that will be called when zooming or panning ends.
First argument is a D3 Zoom Event and second indicates whether
the event has been initiated by a user interaction (e.g. a mouse event):
(event: D3ZoomEvent, userDriven: boolean) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3ZoomEvent<HTMLCanvasElement, undefined> | 
userDriven | boolean | 
Returns
void
Inherited from
Omit.onZoomEnd
onDragStart()?
optionalonDragStart: (e) =>void
Callback function that will be called when dragging starts.
First argument is a D3 Drag Event:
(event: D3DragEvent) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | 
Returns
void
Inherited from
Omit.onDragStart
onDrag()?
optionalonDrag: (e) =>void
Callback function that will be called continuously during dragging.
First argument is a D3 Drag Event:
(event: D3DragEvent) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | 
Returns
void
Inherited from
Omit.onDrag
onDragEnd()?
optionalonDragEnd: (e) =>void
Callback function that will be called when dragging ends.
First argument is a D3 Drag Event:
(event: D3DragEvent) => void.
Default value: undefined
Parameters
| Parameter | Type | 
|---|---|
e | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | 
Returns
void
Inherited from
Omit.onDragEnd
showFPSMonitor?
optionalshowFPSMonitor:boolean
Show WebGL performance monitor.
Default value: false
Inherited from
Omit.showFPSMonitor
pixelRatio?
optionalpixelRatio:number
Canvas pixel ratio.
Default value: 2
Inherited from
Omit.pixelRatio
scalePointsOnZoom?
optionalscalePointsOnZoom:boolean
Increase or decrease the size of the points when zooming in or out.
Default value: false
Inherited from
Omit.scalePointsOnZoom
initialZoomLevel?
optionalinitialZoomLevel:number
Initial zoom level. Can be set once during graph initialization.
If set, fitViewOnInit value will be ignored.
Default value: undefined
Inherited from
Omit.initialZoomLevel
enableZoom?
optionalenableZoom:boolean
Enables or disables zooming in and out.
Default: true
Inherited from
Omit.enableZoom
enableSimulationDuringZoom?
optionalenableSimulationDuringZoom:boolean
Controls whether the simulation remains active during zoom operations.
When set to true, the simulation continues running while zooming.
When set to false, the simulation pauses during zoom operations.
Default value: false
Inherited from
Omit.enableSimulationDuringZoom
enableDrag?
optionalenableDrag:boolean
Enables or disables dragging of points in the graph.
Default value: false
Inherited from
Omit.enableDrag
fitViewOnInit?
optionalfitViewOnInit:boolean
Whether to center and zoom the view to fit all points in the scene on initialization or not.
Ignored if initialZoomLevel is set.
Default: true
Inherited from
Omit.fitViewOnInit
fitViewDelay?
optionalfitViewDelay:number
Delay in milliseconds before fitting the view when fitViewOnInit is enabled.
Useful if you want the layout to stabilize a bit before fitting.
Default: 250
Inherited from
Omit.fitViewDelay
fitViewPadding?
optionalfitViewPadding:number
Padding to apply when fitting the view to show all points.
This value is added to the calculated bounding box to provide some extra space around the points.
This is used when the fitViewOnInit option is enabled.
Default: 0.1
Inherited from
Omit.fitViewPadding
fitViewDuration?
optionalfitViewDuration:number
Duration in milliseconds for fitting the view to show all points when fitViewOnInit is enabled.
Default: 250
Inherited from
Omit.fitViewDuration
fitViewByPointsInRect?
optionalfitViewByPointsInRect: [number,number][] | [[number,number], [number,number]]
When fitViewOnInit is set to true, fits the view to show the points within a rectangle
defined by its two corner coordinates [[left, bottom], [right, top]] in the scene space.
Default: undefined
Inherited from
Omit.fitViewByPointsInRect
randomSeed?
optionalrandomSeed:string|number
Providing a randomSeed value allows you to control
the randomness of the layout across different simulation runs.
It is useful when you want the graph to always look the same on same datasets.
This property will be applied only on component initialization and it
canāt be changed using the setConfig method.
Default value: undefined
Inherited from
Omit.randomSeed
pointSamplingDistance?
optionalpointSamplingDistance:number
Point sampling distance in pixels between neighboring points when calling the getSampledPointPositionsMap method.
This parameter determines how many points will be included in the sample.
Default value: 150
Inherited from
Omit.pointSamplingDistance
rescalePositions?
optionalrescalePositions:boolean
Controls automatic position adjustment of points in the visible space.
When undefined (default):
- If simulation is disabled (
enableSimulation: false), points will be automatically repositioned to fit within the visible space - If simulation is enabled, points will not be rescaled
 
When explicitly set:
true: Forces points positions to be rescaledfalse: Forces points positions to not be rescaled
Inherited from
Omit.rescalePositions