Skip to content

docs: 新增「饼图」文档 #6956

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

Closed
wants to merge 2 commits into from

Conversation

Eomnational
Copy link
Contributor

title: 饼图
order: 5
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original'
category: ['part-to-whole']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proportion,类别的枚举值都在demos/constant.ts

---
title: 饼图
order: 5
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图片都404,都检查下吧

order: 5
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original'
category: ['part-to-whole']
similar: ['donut', 'rose']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

donut-chart 和 rose


---

### 环形图
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### 不适合的场景

例子 1: **类别过多时不适合使用饼图**

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充一下示例不,类似
image


## 饼图的扩展

### 玫瑰图(南丁格尔图)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

玫瑰图有单独的介绍,这里可以不用

- `connector: true` 添加标签连接线
- `outerRadius: 0.8` 调整饼图大小,为标签留出空间

例子 3: **环形图展示多层数据**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

环图有单独的介绍,这里可以去掉,补充饼图的例子

- 柱状图更适合精确的数值比较,不强调与总数的关系
- 当类别较少且需要展示占比时选择饼图,需要精确比较数值时选择柱状图

### 饼图、[环形图](/en/charts/donut)和[玫瑰图](/en/charts/rose)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

donut-chart


嵌套饼图可以同时展示两个层级的分类数据,内外圈分别表示不同的分类维度。

```js | ob { autoMount: true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个写法不对,G2中实现的方法——旭日图
https://g2.antv.antgroup.com/examples/general/sunburst/#sunburst-default

@interstellarmt
Copy link
Contributor

关于文档的修改建议已经在相应的地方评论~修改完后记得同步到英文文档

@Eomnational
Copy link
Contributor Author

Eomnational commented May 29, 2025

WechatIMG11

@interstellarmt
Copy link
Contributor

WechatIMG11

没太懂~

@Eomnational
Copy link
Contributor Author

WechatIMG11

没太懂~

代码提交不上去

@interstellarmt
Copy link
Contributor

有空记得更新一下~

@Eomnational
Copy link
Contributor Author

有空记得更新一下~

这个分支乱掉了我重新开了一个分支
#6996

@github-project-automation github-project-automation bot moved this from In Review to Done in 2025 AntV OSCP Phase4 Jun 16, 2025
@interstellarmt interstellarmt removed the OSCP AntV Open Source Contribution Plan label Jun 16, 2025
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.

2 participants