-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
docs: optimize api docs #6813
base: v5
Are you sure you want to change the base?
docs: optimize api docs #6813
Conversation
yvonneyx
commented
Feb 28, 2025
•
edited
Loading
edited
- 正式下线脚本自动生成文档,改用 git 管理
- 添加交互、插件、数据处理、元素 API 文档,所有类型定义在同一文档中说明,不再使用外链
- 根据 2 月份用户反馈完善文档


// 方式二:传入渲染器实例 | ||
renderer: new SVGRenderer(), | ||
// 方式三:动态设置 | ||
renderer: () => new SVGRenderer(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里只支持方式二,一、三是不支持的
@@ -60,17 +31,126 @@ Graph 类接收一个实例化参数对象,称之为**配置项**(Options, | |||
import { Graph } from '@antv/g6'; | |||
|
|||
const graph = new Graph({ | |||
container: 'container', | |||
width: 800, | |||
container: 'container', // 指定容器 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id
// ... 其他配置项 | ||
data: { | ||
// 初始数据 | ||
nodes: [{ id: 'start', data: { label: 'Hello G6!' } }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label 应该在 style 里吧,或者配置 node.labelText: (d)=>d.label
api 文档没有 matkdown 内容吗? |