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

fix(pie): pie chart avoidLabelOverlap hides label. close #13938 #14108

merged 1 commit into from Jan 25, 2021


Copy link

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

fix chart avoidLabelOverlap hides label even when there are lot's of free space.

Fixed issues


Before: What was the problem?

dx has the direction(1/-1) presentation, if dx < 0; then dx < rA always be true;
But if (-dx) > rA, there would be square root of negative number.

Math.sqrt(dy * dy / (1 - dx * dx / rA / rA))

rB will get NaN.


After: How is it fixed in this PR?

When comparing, dx => Math.abs(dx)



Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs



Merging options

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

Other information

Copy link

echarts-bot bot commented Jan 25, 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.

@pissang pissang added this to the 5.1.0 milestone Jan 25, 2021
Copy link

pissang commented Jan 25, 2021

Wow thanks for the very neat fix!

@pissang pissang merged commit 9f8340c into apache:master Jan 25, 2021
Copy link

echarts-bot bot commented Jan 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants