Skip to content

@sqlrooms/cosmos / CosmosGraphProps

Type Alias: CosmosGraphProps

CosmosGraphProps: object

Props for the CosmosGraph component.

Type declaration

NameTypeDescription
configGraphConfigInterfaceConfiguration object for the graph's visual and behavioral properties
pointPositionsFloat32ArrayFloat32Array containing x,y coordinates for each point (2 values per point)
pointSizesFloat32ArrayFloat32Array containing size values for each point (1 value per point)
pointColorsFloat32ArrayFloat32Array containing RGBA values for each point (4 values per point)
linkIndexes?Float32ArrayOptional Float32Array containing pairs of point indices defining links
linkColors?Float32ArrayOptional Float32Array containing RGBA values for each link (4 values per link)
focusedPointIndex?numberOptional index of the point to focus on
renderPointTooltip?(index) => React.ReactNodeOptional function to render custom tooltip content for a point
children?React.ReactNodeOptional child elements to render inside the graph container