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

Stop mutating arc state while drawing #9153

Merged
merged 5 commits into from May 25, 2021
Merged

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented May 25, 2021

Fix #9151

  • only consider full circles when circumference > TAU
  • pass the custom endAngle as argument instead of mutating state

@kurkle
Copy link
Member Author

kurkle commented May 25, 2021

Filename Size Change
dist/chart.esm.js 70.4 kB +30 B (0%)
dist/chart.js 89.4 kB +30 B (0%)
dist/chart.min.js 63.7 kB +25 B (0%)

@kurkle kurkle requested a review from simonbrunel May 25, 2021 05:07
simonbrunel
simonbrunel previously approved these changes May 25, 2021
Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

Looks good 👍

With these changes, do we still need the special case in #9152?

Did you check that it fixes the issue with the datalabels plugin?

src/elements/element.arc.js Outdated Show resolved Hide resolved
@kurkle
Copy link
Member Author

kurkle commented May 25, 2021

Did you check that it fixes the issue with the datalabels plugin?

image

Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@etimberg etimberg added this to the Version 3.3.1 milestone May 25, 2021
@etimberg etimberg merged commit 03eb826 into chartjs:master May 25, 2021
@kurkle kurkle deleted the arc-take2 branch May 30, 2021 05:35
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.

Label incorrectly positioned with doghnut graph
3 participants