-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add Chinese documentation for the API of @ant-designs/graphs (#…
…2741) * refactor: adjust graph params * docs: add general properties * docs: add overview * docs: add dendrogram api docs * docs: add flow direction graph api docs * docs: add flow graph api docs * docs: add indented tree api docs * docs: add mind map api docs * docs: add network graph api docs * docs: add org chart api docs
- Loading branch information
Showing
48 changed files
with
1,615 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: 通用属性 | ||
--- | ||
|
||
> Tips: 以下通用属性适用于 charts 组件,不支持的组件会单独说明。 | ||
| 参数 | 说明 | 类型 | 默认值 | | ||
| ------------------- | ---------------------------------------------------------- | ------------------------------- | ------- | | ||
| containerStyle | 配置图表容器的样式,接受一个包含 CSS 属性和值的对象 | `React.CSSProperties` | - | | ||
| containerAttributes | 为图表容器添加自定义的 HTML 属性 | `Record<string, any>` | - | | ||
| className | 添加在组件最外层的 className | `string` | - | | ||
| loading | 表示图表是否处于加载状态 | `boolean` | `false` | | ||
| loadingTemplate | 自定义加载模板,当图表加载时显示的元素 | `React.ReactElement` | - | | ||
| errorTemplate | 自定义错误模板,当图表出错时调用的函数,返回显示的错误信息 | `(e: Error) => React.ReactNode` | - | |
50 changes: 50 additions & 0 deletions
50
site/docs/options/graphs/demos/dendrogram/collapse-expand.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Dendrogram, type DendrogramOptions } from '@ant-design/graphs'; | ||
import React from 'react'; | ||
|
||
const data = { | ||
nodes: [ | ||
{ id: 'Modeling Methods', depth: 0, children: ['Classification', 'Consensus', 'Regression'] }, | ||
{ id: 'Classification', depth: 1 }, | ||
{ id: 'Consensus', depth: 1, children: ['Models diversity', 'Methods', 'Common'] }, | ||
{ id: 'Models diversity', depth: 2 }, | ||
{ id: 'Methods', depth: 2 }, | ||
{ id: 'Common', depth: 2 }, | ||
{ | ||
id: 'Regression', depth: 1, "children": [ | ||
"Multiple linear regression", | ||
"Partial least squares", | ||
"Multi-layer feedforward neural network", | ||
"General regression neural network", | ||
"Support vector regression" | ||
] | ||
}, | ||
{ "id": "Multiple linear regression", depth: 3 }, | ||
{ "id": "Partial least squares", depth: 3 }, | ||
{ "id": "Multi-layer feedforward neural network", depth: 3 }, | ||
{ "id": "General regression neural network", depth: 3 }, | ||
{ "id": "Support vector regression", depth: 3 }, | ||
], | ||
edges: [ | ||
{ source: 'Modeling Methods', target: 'Classification' }, | ||
{ source: 'Modeling Methods', target: 'Consensus' }, | ||
{ source: 'Modeling Methods', target: 'Regression' }, | ||
{ source: 'Consensus', target: 'Models diversity' }, | ||
{ source: 'Consensus', target: 'Methods' }, | ||
{ source: 'Consensus', target: 'Common' }, | ||
{ source: 'Regression', target: 'Multiple linear regression' }, | ||
{ source: 'Regression', target: 'Partial least squares' }, | ||
{ source: 'Regression', target: 'Multi-layer feedforward neural network' }, | ||
{ source: 'Regression', target: 'General regression neural network' }, | ||
{ source: 'Regression', target: 'Support vector regression' }, | ||
], | ||
}; | ||
export default () => { | ||
const options: DendrogramOptions = { | ||
containerStyle: { height: '320px' }, | ||
autoFit: 'view', | ||
data, | ||
behaviors: (behaviors) => [...behaviors, 'collapse-expand'], | ||
}; | ||
|
||
return <Dendrogram {...options} /> | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Dendrogram, type DendrogramOptions } from '@ant-design/graphs'; | ||
import React from 'react'; | ||
|
||
const data = { | ||
nodes: [ | ||
{ id: 'Modeling Methods', depth: 0, children: ['Classification', 'Consensus', 'Regression'] }, | ||
{ id: 'Classification', depth: 1 }, | ||
{ id: 'Consensus', depth: 1, children: ['Models diversity', 'Methods', 'Common'] }, | ||
{ id: 'Models diversity', depth: 2 }, | ||
{ id: 'Methods', depth: 2 }, | ||
{ id: 'Common', depth: 2 }, | ||
{ | ||
id: 'Regression', depth: 1, "children": [ | ||
"Multiple linear regression", | ||
"Partial least squares", | ||
"Multi-layer feedforward neural network", | ||
"General regression neural network", | ||
"Support vector regression" | ||
] | ||
}, | ||
{ "id": "Multiple linear regression", depth: 3 }, | ||
{ "id": "Partial least squares", depth: 3 }, | ||
{ "id": "Multi-layer feedforward neural network", depth: 3 }, | ||
{ "id": "General regression neural network", depth: 3 }, | ||
{ "id": "Support vector regression", depth: 3 }, | ||
], | ||
edges: [ | ||
{ source: 'Modeling Methods', target: 'Classification' }, | ||
{ source: 'Modeling Methods', target: 'Consensus' }, | ||
{ source: 'Modeling Methods', target: 'Regression' }, | ||
{ source: 'Consensus', target: 'Models diversity' }, | ||
{ source: 'Consensus', target: 'Methods' }, | ||
{ source: 'Consensus', target: 'Common' }, | ||
{ source: 'Regression', target: 'Multiple linear regression' }, | ||
{ source: 'Regression', target: 'Partial least squares' }, | ||
{ source: 'Regression', target: 'Multi-layer feedforward neural network' }, | ||
{ source: 'Regression', target: 'General regression neural network' }, | ||
{ source: 'Regression', target: 'Support vector regression' }, | ||
], | ||
}; | ||
|
||
export default () => { | ||
const options: DendrogramOptions = { | ||
containerStyle: { height: '320px' }, | ||
compact: true, | ||
autoFit: 'view', | ||
data, | ||
animation: false, | ||
}; | ||
|
||
return <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)' }}> | ||
<Dendrogram {...options} direction='vertical' /> | ||
<Dendrogram {...options} direction='horizontal' /> | ||
<Dendrogram {...options} direction='radial' /> | ||
</div>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Dendrogram, type DendrogramOptions } from '@ant-design/graphs'; | ||
import React from 'react'; | ||
|
||
const data = { | ||
nodes: [ | ||
{ id: 'Modeling Methods', depth: 0, children: ['Classification', 'Consensus', 'Regression'] }, | ||
{ id: 'Classification', depth: 1 }, | ||
{ id: 'Consensus', depth: 1, children: ['Models diversity', 'Methods', 'Common'] }, | ||
{ id: 'Models diversity', depth: 2 }, | ||
{ id: 'Methods', depth: 2 }, | ||
{ id: 'Common', depth: 2 }, | ||
{ | ||
id: 'Regression', depth: 1, "children": [ | ||
"Multiple linear regression", | ||
"Partial least squares", | ||
"Multi-layer feedforward neural network", | ||
"General regression neural network", | ||
"Support vector regression" | ||
] | ||
}, | ||
{ "id": "Multiple linear regression", depth: 3 }, | ||
{ "id": "Partial least squares", depth: 3 }, | ||
{ "id": "Multi-layer feedforward neural network", depth: 3 }, | ||
{ "id": "General regression neural network", depth: 3 }, | ||
{ "id": "Support vector regression", depth: 3 }, | ||
], | ||
edges: [ | ||
{ source: 'Modeling Methods', target: 'Classification' }, | ||
{ source: 'Modeling Methods', target: 'Consensus' }, | ||
{ source: 'Modeling Methods', target: 'Regression' }, | ||
{ source: 'Consensus', target: 'Models diversity' }, | ||
{ source: 'Consensus', target: 'Methods' }, | ||
{ source: 'Consensus', target: 'Common' }, | ||
{ source: 'Regression', target: 'Multiple linear regression' }, | ||
{ source: 'Regression', target: 'Partial least squares' }, | ||
{ source: 'Regression', target: 'Multi-layer feedforward neural network' }, | ||
{ source: 'Regression', target: 'General regression neural network' }, | ||
{ source: 'Regression', target: 'Support vector regression' }, | ||
], | ||
}; | ||
export default () => { | ||
const options: DendrogramOptions = { | ||
containerStyle: { height: '320px' }, | ||
autoFit: 'view', | ||
data, | ||
animation: false, | ||
}; | ||
|
||
return <Dendrogram {...options} /> | ||
}; |
Oops, something went wrong.