g6/packages/site/docs/apis/data/GraphData.zh.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

810 B
Raw Blame History

title order
GraphData 1

图数据GraphData是 Graph 接收的数据类型之一,包含节点、边、群组 的集合。

一个图数据的示例如下:

{
  "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": {} }]
}

属性

nodes 必须

类型NodeUserModel

节点集

edges 必须

类型EdgeUserModel

边集

combos

类型ComboUserModel

群组集