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

docs: optimize api docs #6813

Open
wants to merge 7 commits into
base: v5
Choose a base branch
from
Open

docs: optimize api docs #6813

wants to merge 7 commits into from

Conversation

yvonneyx
Copy link
Contributor

@yvonneyx yvonneyx commented Feb 28, 2025

  • 正式下线脚本自动生成文档,改用 git 管理
  • 添加交互、插件、数据处理、元素 API 文档,所有类型定义在同一文档中说明,不再使用外链
  • 根据 2 月份用户反馈完善文档
image image

// 方式二:传入渲染器实例
renderer: new SVGRenderer(),
// 方式三:动态设置
renderer: () => new SVGRenderer(),
Copy link
Contributor

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', // 指定容器
Copy link
Contributor

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!' } }],
Copy link
Contributor

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

@hustcc
Copy link
Member

hustcc commented Feb 28, 2025

api 文档没有 matkdown 内容吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants