A network graph is a diagram that displays relationships (edges) between entities (nodes). Through the connections of nodes and edges, it intuitively represents complex network structures. Each node represents an entity, and each edge represents a relationship or connection between two nodes.
In the Harry Potter series, Harry Potter's two best friends are Hermione Granger and Ron Weasley, and Voldemort is Harry's main enemy who attempted to kill Harry. Visualize with a network graph.
Team Collaboration Flow
Visualize the relationships between "Artificial Intelligence" related concepts in a knowledge graph using a network graph.
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "network-graph". |
| data | Object | required | Chart data, containing nodes and edges fields. |
| data.nodes | Object[] | required | Node array, each node represents an entity. |
| data.nodes.name | string | required | Node name, used as the unique identifier. |
| data.edges | Object[] | required | Edge array, each edge represents a relationship between two nodes. |
| data.edges.source | string | required | Source node name, pointing to the name property of a node. |
| data.edges.target | string | required | Target node name, pointing to the name property of a node. |
| data.edges.name | string | optional | Edge label, used to describe the relationship between two nodes. |
| layout | 'force' | 'circular' | 'grid' | 'radial' | 'concentric' | 'dagre' | optional | Layout algorithm, default is "force". |
| title | string | optional | Chart title. |
| theme | 'default' | 'dark' | 'academy' | optional | Chart theme, default is "default". |