Children to render in the canvas. Useful for things like lights.
glOptions
object
Ability to extend Canvas gl options. For example { preserveDrawingBuffer: true }
{}
onLasso
(selections: string[]) => void
When the canvas had a lasso selection.
onLassoEnd
(selections: string[]) => void
When the canvas had a lasso selection end.
onCanvasClick
(event: MouseEvent) => void
When the canvas was clicked but didnβt hit a node/edge.
aggregateEdges
boolean
Whether to aggregate edges with the same source and target.
layoutType
LayoutTypes
Type of layout.
'forceDirected2d'
selections
string[]
List of ids that are selected.
[]
actives
string[]
List of ids that are active.
[]
collapsedNodeIds
string[]
List of node ids that are collapsed.
[]
animated
boolean
Animate or not the graph positions.
true
nodes
GraphNode[]
Nodes to pass to the graph.
edges
GraphEdge[]
Edges to pass to the graph.
contextMenu
(event: ContextMenuEvent) => ReactNode
Context menu element.
sizingType
SizingType
Type of sizing for nodes.
'default'
labelType
LabelVisibilityType
Type of visibility for labels.
'auto'
edgeLabelPosition
EdgeLabelPosition
Place of visibility for edge labels.
'inline'
edgeArrowPosition
EdgeArrowPosition
Placement of edge arrows.
'end'
edgeInterpolation
EdgeInterpolation
Shape of edge.
'linear'
labelFontUrl
string
Font of label, same as troika-three-text.
The URL of a custom font file to be used. Supported font formats are: .ttf, .otf, .woff (.woff2 is not supported).
If not provided, the Roboto font is loaded from the Google Fonts CDN.
sizingAttribute
string
Attribute based sizing property.
defaultNodeSize
number
The default size to size nodes to.
7
minNodeSize
number
When using sizing attributes, the min size a node can be.
5
maxNodeSize
number
When using sizing attributes, the max size a node can be.