-
Notifications
You must be signed in to change notification settings - Fork 649
docs: 增加放大镜&饼图标签文档 #2133
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: 增加放大镜&饼图标签文档 #2133
Conversation
Summary of ChangesHello @tangying1027, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 本次拉取请求主要致力于完善图表组件的文档。它新增了放大镜和饼图标签组件的详细说明,更新了图例组件的布局模式属性,并对仪表盘、旭日图和矩形树图的文档路径进行了调整,以优化文档结构和可发现性。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
本次 PR 主要增加了放大镜(Magnifier)和饼图标签(PieLabel)的组件文档,并对部分现有文档进行了重构和更新。整体上提升了文档的覆盖面,做得不错。
我在评审中发现了一些可以改进的地方,主要集中在新文档中:
magnifier.zh.md中存在两个功能相似但默认值冲突的属性show和visible,可能会让用户感到困惑。pieLabel.zh.md的代码示例中使用了未定义的变量,会导致用户直接复制使用时出错。gauge.zh.md中有空的章节和描述不够清晰的属性。legend.zh.md中有一个小的标点格式问题。
建议在合并前修复这些问题,以提高文档的质量和准确性。
| fontWeight: 500, | ||
| })} | ||
| label2={(data) => ({ | ||
| text: data.value + ' (' + ((data.value / total) * 100).toFixed(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.
| <Chart data={allData}> | ||
| <Pie x="name" y="value" /> | ||
| <PieLabel | ||
| type="spider" | ||
| records={allData.filter((d) => d.value > 10)} // 只显示值大于10的标签 | ||
| label1={(data) => ({ text: data.name })} | ||
| label2={(data) => ({ text: data.value + '%' })} | ||
| /> | ||
| </Chart> |
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.
| ### show: boolean | ||
|
|
||
| 是否显示放大镜,默认为 `false` | ||
|
|
||
| ### x: number | ||
|
|
||
| 放大镜中心点的 x 坐标,默认为 `0` | ||
|
|
||
| ### y: number | ||
|
|
||
| 放大镜中心点的 y 坐标,默认为 `0` | ||
|
|
||
| ### width: number | ||
|
|
||
| 放大镜的宽度,默认为 `100` | ||
|
|
||
| ### height: number | ||
|
|
||
| 放大镜的高度,默认为 `80` | ||
|
|
||
| ### scale: number | ||
|
|
||
| 放大倍数,默认为 `2` | ||
|
|
||
| ### radius: number | ||
|
|
||
| 放大镜圆角半径,默认为 `10` | ||
|
|
||
| ### borderWidth: number | ||
|
|
||
| 边框宽度,默认为 `1` | ||
|
|
||
| ### borderColor: string | ||
|
|
||
| 边框颜色,默认为 `#e8e8e8` | ||
|
|
||
| ### backgroundColor: string | ||
|
|
||
| 背景颜色,默认为 `rgba(255, 255, 255, 0.9)` | ||
|
|
||
| ### shadowBlur: number | ||
|
|
||
| 阴影模糊程度,默认为 `10` | ||
|
|
||
| ### shadowColor: string | ||
|
|
||
| 阴影颜色,默认为 `rgba(0, 0, 0, 0.3)` | ||
|
|
||
| ### visible: boolean | ||
|
|
||
| 是否显示,默认为 `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.
|
|
||
| ### layoutMode: 'uniform' | 'adaptive' | ||
|
|
||
| 可选值为:`'uniform' | 'adaptive'` , 默认为 `'uniform'` |
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.
| ### field: string | ||
|
|
||
| 数据字段名 |
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.
Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: |
Checklist
npm testpassesDescription of change