g6/packages/site/docs/apis/data/GraphData.en.md
Aaron 3534d4669b
docs: adjust docs of data (#5211)
* docs: adjust docs of data

* docs: update api docs
2023-12-01 17:44:49 +08:00

863 B

title order
GraphData 1

Graph data (GraphData) is one of the data types received by Graph, which contains a collection of nodes, edges, and combos.

An example of a graph data is as follows:

{
  "nodes": [
    { "id": "node-1", "data": { "parentId": "combo-1" } },
    { "id": "node-2", "data": { "parentId": "combo-1" } }
  ],
  "edges": [{ "id": "edge-1", "source": "node-1", "target": "node-2" }],
  "combos": [{ "id": "combo-1", "data": {} }]
}

Properties

nodes Required

Type: NodeUserModel[]

Nodes collection

edges Required

Type: EdgeUserModel

Edges collection

combos

Type: ComboUserModel

Combos collection