mirror of
https://gitee.com/antv/g6.git
synced 2024-12-16 02:21:25 +08:00
3534d4669b
* docs: adjust docs of data * docs: update api docs
1.0 KiB
1.0 KiB
title | order |
---|---|
TreeData | 2 |
A tree is a special graph, that is, a graph without a cycle. Tree data (TreeData) does not explicitly define edges, but implicitly represents edges through nested children
, that is, there is an edge between parent and child nodes.
An example of a tree data is as follows:
{
"id": "root",
"data": {},
"children": [
{
"id": "node-1",
"data": {},
"children": [
{
"id": "node-1-1",
"data": {},
"children": [
{
"id": "node-1-1-1",
"data": {},
"children": []
}
]
}
]
}
]
}
G6 5.0 can read TreeData
, TreeData[]
, that is, tree and forest.
Properties
data Required
Type: NodeUserModelData;
The data of the node
children
Type: TreeData
The array of child nodes of the current node