The default edge style to be applied on all nodes
The default edge's label style to be applied on all nodes
The default node style to be applied on all nodes
Controls whether non-connected nodes and edges are grayed out when a node is selected
Controls whether nodes can be expanded or collapsed to show their children
OptionalmarkerDefines custom styles for marker shapes used in the graph.
Each key is a marker type (e.g., 'diamond', 'arrow') and maps to a MarkerStyle object.
OptionalnodeMaps node types to their styles.
Each key is a node type (as returned by nodeTypeAccessor) and maps to a NodeStyle object.
Used in conjuction with nodeTypeAccessor
OptionalnodeFunction to access the type of a node. Used in
Used to style nodes based on their type.
Used in conjuction with nodeStyleMap
OptionalrenderCustom renderer for clusters.
Allows full control over how a cluster is displayed The function can return either:
HTMLElement to be used as the cluster, orrenderCluster: (cluster: Node): HTMLElement | string | void => {
const size = 12;
const style = [
'display:block',
`width:${size}px`,
`height:${size}px`,
'background-color:#907acc',
'border: 2px solid #fff',
'border-radius:50%',
'opacity: 1',
].join(';');
return `<span style="${style}"></span>`;
}
OptionalrenderCustom renderer for edge labels.
Allows full control over how edge labels are displayed. The function can return either:
HTMLElement to be used as the edge's label, orOptionalrenderCustom renderer for nodes.
Allows full control over how a node is displayed The function can return either:
HTMLElement to be used as the node, orDefines the rendering method used by the graph.
Callback executed during the init phase, before the first rendering