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 rounding issue in sunbursts using _chart.equalRingSizes #1662

Closed

Conversation

the3ver
Copy link
Contributor

@the3ver the3ver commented Mar 5, 2020

fixes #1661

@the3ver the3ver marked this pull request as ready for review March 5, 2020 15:18
gordonwoodhull added a commit that referenced this pull request Mar 5, 2020
@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Mar 5, 2020

I noticed this problem when reviewing #1655 but then I forgot to say anything about it.

I prefer to fix the issue by being lenient in assertPortionsArray:

            if (Math.abs(portionsSum - 1) > dc.constants.NEGLIGIBLE_NUMBER) {

since this will come up for other relative ring sizes.

Took your tests, expanded to testing 2-27 equal rings, and applied the above fix for 3.2.1 and 4.0.3

Thanks @the3ver!

gordonwoodhull added a commit that referenced this pull request Mar 5, 2020
@the3ver the3ver deleted the the3ver-equal-ring-sizes-fix-3.2 branch March 11, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants