Skip to Content
Docs📚 ⏐ APIData Shapes

Data Shapes

The graph is made up of 2 basic data shape objects you can pass to the graph.

  • GraphNode - The sphere element-like object that represents an entity in the graph
  • GraphEdge - The link between Nodes

GraphElementBaseAttributes

export interface GraphElementBaseAttributes<T = any> { /** * ID of the element. */ id: string; /** * Extra data associated with the element. */ data?: T; /** * Label for the element. */ label?: string; /** * Size of the element. */ size?: number; /** * Force label visible or not. */ labelVisible?: boolean; }

GraphNode

export interface GraphNode extends GraphElementBaseAttributes { /** * Icon URL for the node. */ icon?: string; /** * Fill color for the node. */ fill?: string; }

GraphEdge

export interface GraphEdge extends GraphElementBaseAttributes { /** * Source ID of the node. */ source: string; /** * Target ID of the node. */ target: string; }
Last updated on