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

feat(label): sector label positions for polar bars and rotate for pies #15182

Merged
merged 12 commits into from
Jul 7, 2021

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Jun 18, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

This PR supports polar bar label positions according to the sectors, and supports rotation for pie labels.

Fixed issues

Details

Before: What was the problem?

Label positions can only calculated by the bounding box of the sectors but not according to sector shapes.

image
image

After: How is it fixed in this PR?

Polar bars

Along with the old values of label positions (like 'inside'), this PR provides new position values:

'start' | 'insideStart' | 'middle' | 'insideEnd' | 'end'

image
image

Pie Series

'radial' and 'tangential' values are supported for series[pie].label.rorate.

image

Misc

Related test cases or examples to use the new APIs

  • test/bar-polar-label.html

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Jun 18, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

This PR depends on ZRender changes. Please update the ZRender dependency to the latest nightly version including this change, which takes place everyday at 8:00 UTC (16:00 Beijing Time).
You can use npm i zrender@npm:zrender-nightly to update package.json.
If you have any question about this, please leave a comment and we will give you extra help on this.

@echarts-bot echarts-bot bot added PR: author is committer PR: awaiting doc Document changes is required for this PR. PR: awaiting review labels Jun 18, 2021
@Ovilia Ovilia marked this pull request as draft June 18, 2021 08:33
@Ovilia Ovilia marked this pull request as ready for review June 21, 2021 10:53
@Ovilia Ovilia changed the title feat(label): support sector label positions for polar bars feat(label): sector label positions for polar bars and rorate for pies Jun 24, 2021
@Ovilia Ovilia changed the title feat(label): sector label positions for polar bars and rorate for pies feat(label): sector label positions for polar bars and rotate for pies Jun 24, 2021
src/chart/bar/BarSeries.ts Outdated Show resolved Hide resolved
src/chart/bar/BarView.ts Outdated Show resolved Hide resolved
src/label/sectorLabel.ts Outdated Show resolved Hide resolved
pissang
pissang previously approved these changes Jun 30, 2021
@Ovilia Ovilia merged commit 8384dba into master Jul 7, 2021
@echarts-bot
Copy link

echarts-bot bot commented Jul 7, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@Ovilia Ovilia deleted the feat-sector-label branch July 7, 2021 02:52
@Ovilia Ovilia removed PR: awaiting review PR: awaiting doc Document changes is required for this PR. labels Aug 31, 2021
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.

2 participants