-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(docs): labels spec update #6647
base: v5
Are you sure you want to change the base?
Conversation
Walkthrough: 本次更新主要涉及组件标签文本的更新,特别是对 G2 数据标签(Label)的使用和配置进行了详细的说明和示例更新。通过增加新的内容和示例,帮助用户更好地理解和使用标签功能。 Changes:
|
Pull Request Test Coverage Report for Build 13855277586Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
||
```js | ||
// API 方式 | ||
// 第一种方式 | ||
// 第一种方式 label 分别配置 传入对象 |
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的文档里不用介绍api模式了,后面会专门出一篇文档介绍。
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 中**数据标签(Label)** 是给图表添加标注的手段之一,对当前的一组数据进行的内容标注。包括数据点、拉线、文本数值等元素,根据不同的图表类型选择使用。通过简洁的文字说明,减少误解,使图表更易解读,并且强调关键数据或趋势,引导关注重要信息。 |
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 plot的这个拉线有点太抽象了,统一改成连接线吧,更好懂一点
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.
已修改
| style | 标签样式配置 | [style](#style) | - | | | ||
| background| 是否展示背景颜色 | _boolean_ | - | | | ||
| formatter | 标签文本格式化 | _string_ \| _Function\<string\>_ | - | | | ||
| connector | 是否展示连接线 在 饼图和环形图等非笛卡尔坐标系下使用 | _boolean_ | - | | |
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.
已修改, 我直接用示例应该也差不多
|
||
不同的转化类型,针对不同的标签问题情况。所以明确每个 `transform` 标签转化的区别十分有必要。 | ||
|
||
#### overlapDodgeY |
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.
已修改
更新 组件 label 标签文本