Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改layout里的type参数indeted拼写错误 应为indented #5618

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/site/docs/api/TreeGraph.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ const data = {
- Tree layout algorithms do not modify the source data. it generates a new data instead. And the source data will be a property of the new data. This mechanism will reduce the complexity of transformation from nested data to nodes and edges in graph.
- The layout will be re-calculated after adding / deleting / expanding / collapsing nodes on the tree.

TreeGraph is inherited from Graph, please refer to [G6.Graph(GraphOptions)](/en/docs/api/Graph) for its configurations. One difference is the `layout` option. There are four layout algorithms for tree in G6: dendrogram, compactBox, mindmap, and indeted, whose detailed configurations are listed in [TreeGraph Layout](/en/docs/api/tree-graph-layout/guide).
TreeGraph is inherited from Graph, please refer to [G6.Graph(GraphOptions)](/en/docs/api/Graph) for its configurations. One difference is the `layout` option. There are four layout algorithms for tree in G6: dendrogram, compactBox, mindmap, and indented, whose detailed configurations are listed in [TreeGraph Layout](/en/docs/api/tree-graph-layout/guide).
2 changes: 1 addition & 1 deletion packages/site/docs/api/TreeGraph.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ const data = {
- 树图的布局算法一般是不改变源数据的,而是重新生成一份数据,将源数据作为新数据的一个属性。如果每次都需要做次遍历转换数据到节点和边的数据增加了用户的实现复杂度。
- 树图的每次新增/删除/展开/收缩节点,都需要重新计算布局。遍历一份结构化数据对应到图上每个节点去做更新操作,也很麻烦。

TreeGraph 继承自 Graph,配置项参考 [G6.Graph(GraphOptions)](/zh/docs/api/Graph)。其中, layout 配置项支持的布局类型 (`type` 属性) 和 Graph 中所支持的类型不同,TreeGraph 中 layout 目前支持 dendrogram、compactBox、mindmap 和 indeted 四种布局方式,具体配置方式见 [TreeGraph Layout](/zh/docs/api/tree-graph-layout/guide)。
TreeGraph 继承自 Graph,配置项参考 [G6.Graph(GraphOptions)](/zh/docs/api/Graph)。其中, layout 配置项支持的布局类型 (`type` 属性) 和 Graph 中所支持的类型不同,TreeGraph 中 layout 目前支持 dendrogram、compactBox、mindmap 和 indented 四种布局方式,具体配置方式见 [TreeGraph Layout](/zh/docs/api/tree-graph-layout/guide)。
4 changes: 2 additions & 2 deletions packages/site/docs/api/treeGraphLayout/guide.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const graph = new G6.TreeGraph({

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| type | String | dendrogram | The type of layout. Options: `'dendrogram'`, `'compactBox'`, `'mindmap'`, and `'indeted'`. |
| type | String | dendrogram | The type of layout. Options: `'dendrogram'`, `'compactBox'`, `'mindmap'`, and `'indented'`. |
| excludeInvisibles | Boolean | false | *Supported by v4.8.8.* Whether to exclude the hidden nodes. Assign it to true to exclude. |
| direction | String | LR | The direction of layout. Options: `'LR'` , `'RL'` , `'TB'` , `'BT'` , `'H'` , and `'V'`.<br />L: Left; R: right; T: top; B: bottom; H: horizontal; V: vertical. |
| getChildren | Function | | Return all the children nodes of the current node. |

<span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️Attention:</strong></span> When`type='indeted'`, `direction` can only be `'LR'`, `'RL'`, and `'H'`.
<span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️Attention:</strong></span> When`type='indented'`, `direction` can only be `'LR'`, `'RL'`, and `'H'`.
4 changes: 2 additions & 2 deletions packages/site/docs/api/treeGraphLayout/guide.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const graph = new G6.TreeGraph({

| 名称 | 类型 | 默认值 | 描述 |
| --- | --- | --- | --- |
| type | String | dendrogram | 布局类型,支持 dendrogram、compactBox、mindmap 和 indeted。 |
| type | String | dendrogram | 布局类型,支持 dendrogram、compactBox、mindmap 和 indented。 |
| excludeInvisibles | Boolean | false | *v4.8.8 起支持。* 布局计算是否排除掉隐藏的节点,若配置为 true,则隐藏节点不参与布局计算。 |
| direction | String | LR | 布局方向,有  `LR` , `RL` , `TB` , `BT` , `H` , `V`  可选。<br />L:左;R:右;T:上;B:下;H:垂直;V:水平。 |
| getChildren | Function | | 返回当前节点的所有子节点 |

<span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️ 注意:</strong></span> 当 `type='indeted'` 时,`direction` 只能取 `'LR'`、`'RL'` 和 `'H'` 这三个值。
<span style="background-color: rgb(251, 233, 231); color: rgb(139, 53, 56)"><strong>⚠️ 注意:</strong></span> 当 `type='indented'` 时,`direction` 只能取 `'LR'`、`'RL'` 和 `'H'` 这三个值。
Loading