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

refactor: walkthrough label #2981

Merged
merged 9 commits into from
Nov 9, 2020
Merged

refactor: walkthrough label #2981

merged 9 commits into from
Nov 9, 2020

Conversation

visiky
Copy link
Member

@visiky visiky commented Nov 6, 2020

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
修复问题
问题描述 问题截图 修复情况
interval设置label position middle 且 offset>= 0 时,颜色无法自动adjust image image
饼图 spider 点击图例筛选之后,label 错位 image image

@visiky visiky requested review from hustcc, lessmost and simaQ November 6, 2020 03:36
@visiky visiky changed the title refactor: walkthrough label wip: refactor: walkthrough label Nov 6, 2020
@pr-triage pr-triage bot removed the PR: unreviewed label Nov 6, 2020
@lgtm-com
Copy link

lgtm-com bot commented Nov 6, 2020

This pull request introduces 1 alert and fixes 3 when merging 2dc96c9 into bdde7f3 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 3 for Unused variable, import, function or class

*/
protected getDefaultOffset(offset: number) {
protected getLabelOffset(offset: number | string): number {
Copy link
Member Author

Choose a reason for hiding this comment

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

很多处地方都调用了 getDefaultOffset,但实际上并不需要,并且也不是默认 offset;改名为 getLabelOffset, 且在获取 labelCfg 中调用,设置 labelCfg.offset

labelCfg(用户配置) -> labelOffsetPoint -> labelItem (详细可以看类型定义)

@visiky visiky linked an issue Nov 6, 2020 that may be closed by this pull request
1 task
@visiky visiky changed the title wip: refactor: walkthrough label refactor: walkthrough label Nov 6, 2020
@lgtm-com
Copy link

lgtm-com bot commented Nov 6, 2020

This pull request introduces 1 alert and fixes 3 when merging 91a3c44 into 4dcf6c9 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 3 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2020

This pull request introduces 2 alerts and fixes 3 when merging 81d4c27 into 4dcf6c9 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

fixed alerts:

  • 3 for Unused variable, import, function or class

@coveralls
Copy link

coveralls commented Nov 7, 2020

Pull Request Test Coverage Report for Build 350991689

  • 76 of 77 (98.7%) changed or added relevant lines in 7 files are covered.
  • 14 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.03%) to 93.676%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/geometry/label/base.ts 12 13 92.31%
Files with Coverage Reduction New Missed Lines %
src/geometry/label/layout/pie/distribute.ts 1 88.81%
src/geometry/label/base.ts 2 92.59%
src/geometry/label/interval.ts 5 92.74%
src/geometry/label/polar.ts 6 88.4%
Totals Coverage Status
Change from base Build 348939637: -0.03%
Covered Lines: 10344
Relevant Lines: 10724

💛 - Coveralls

@visiky visiky force-pushed the walkthrough-label branch from 81d4c27 to 86e4c02 Compare November 7, 2020 06:58
@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2020

This pull request introduces 2 alerts and fixes 3 when merging 86e4c02 into 4dcf6c9 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

fixed alerts:

  • 3 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2020

This pull request introduces 2 alerts and fixes 3 when merging f7aeaee into 4dcf6c9 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

fixed alerts:

  • 3 for Unused variable, import, function or class

@visiky visiky mentioned this pull request Nov 7, 2020
4 tasks
@hustcc hustcc self-requested a review November 7, 2020 12:53
@lessmost lessmost merged commit 49051d4 into master Nov 9, 2020
@lessmost lessmost deleted the walkthrough-label branch November 9, 2020 01:38
hustcc pushed a commit to antvis/G2Plot that referenced this pull request Nov 9, 2020
* refactor(docs): 饼图 & 玫瑰图文案和demo走查

* refactor(pie-label): 移除饼图 inner-label 自定义;G2 内置对 string offset 处理

详细:antvis/G2#2981

* docs(pie): 饼图 colorField 为必选,同时显式说明饼图label type有哪些类型

* feat(pie-label): 饼图 label offset 适配,自动根据标签 type 调整 offset

* refactor(docs): 文档优化

* refactor(docs): 文档走查

* feat(testcases): 修复单测
jinhuiWong pushed a commit to jinhuiWong/G2Plot that referenced this pull request Nov 15, 2020
* refactor(docs): 饼图 & 玫瑰图文案和demo走查

* refactor(pie-label): 移除饼图 inner-label 自定义;G2 内置对 string offset 处理

详细:antvis/G2#2981

* docs(pie): 饼图 colorField 为必选,同时显式说明饼图label type有哪些类型

* feat(pie-label): 饼图 label offset 适配,自动根据标签 type 调整 offset

* refactor(docs): 文档优化

* refactor(docs): 文档走查

* feat(testcases): 修复单测
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'pie-spider' layout的饼图标签位置错误
4 participants