-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
docs: 新增「饼图」文档 #6956
Conversation
Eomnational
commented
May 28, 2025
- [Docs]: 新增文档 「图表介绍」 #6920
title: 饼图 | ||
order: 5 | ||
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original' | ||
category: ['part-to-whole'] |
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.
proportion,类别的枚举值都在demos/constant.ts
--- | ||
title: 饼图 | ||
order: 5 | ||
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original' |
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.
图片都404,都检查下吧
order: 5 | ||
screenshot: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*q_VWSqumTu4AAAAAAAAAAAAADmJ7AQ/original' | ||
category: ['part-to-whole'] | ||
similar: ['donut', 'rose'] |
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.
donut-chart 和 rose
|
||
--- | ||
|
||
### 环形图 |
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.
### 不适合的场景 | ||
|
||
例子 1: **类别过多时不适合使用饼图** | ||
|
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.
|
||
## 饼图的扩展 | ||
|
||
### 玫瑰图(南丁格尔图) |
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.
玫瑰图有单独的介绍,这里可以不用
- `connector: true` 添加标签连接线 | ||
- `outerRadius: 0.8` 调整饼图大小,为标签留出空间 | ||
|
||
例子 3: **环形图展示多层数据** |
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.
环图有单独的介绍,这里可以去掉,补充饼图的例子
- 柱状图更适合精确的数值比较,不强调与总数的关系 | ||
- 当类别较少且需要展示占比时选择饼图,需要精确比较数值时选择柱状图 | ||
|
||
### 饼图、[环形图](/en/charts/donut)和[玫瑰图](/en/charts/rose) |
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.
donut-chart
|
||
嵌套饼图可以同时展示两个层级的分类数据,内外圈分别表示不同的分类维度。 | ||
|
||
```js | ob { autoMount: true } |
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.
这个写法不对,G2中实现的方法——旭日图
https://g2.antv.antgroup.com/examples/general/sunburst/#sunburst-default
关于文档的修改建议已经在相应的地方评论~修改完后记得同步到英文文档 |
有空记得更新一下~ |
这个分支乱掉了我重新开了一个分支 |