@sqlrooms/cosmos / CosmosGraphProps
Type Alias: CosmosGraphProps
CosmosGraphProps =
object
Props for the CosmosGraph component.
Properties
config
config:
GraphConfigInterface
Configuration object for the graph's visual and behavioral properties
pointPositions
pointPositions:
Float32Array
Float32Array containing x,y coordinates for each point (2 values per point)
pointSizes
pointSizes:
Float32Array
Float32Array containing size values for each point (1 value per point)
pointColors
pointColors:
Float32Array
Float32Array containing RGBA values for each point (4 values per point)
linkIndexes?
optionallinkIndexes?:Float32Array
Optional Float32Array containing pairs of point indices defining links
linkColors?
optionallinkColors?:Float32Array
Optional Float32Array containing RGBA values for each link (4 values per link)
focusedPointIndex?
optionalfocusedPointIndex?:number
Optional index of the point to focus on
renderPointTooltip?
optionalrenderPointTooltip?: (index) =>React.ReactNode
Optional function to render custom tooltip content for a point
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
React.ReactNode
children?
optionalchildren?:React.ReactNode
Optional child elements to render inside the graph container