Skip to content

Added unit test for doughnut rotation/circumference, fix for rotation = 0#2273

Merged
etimberg merged 1 commit intochartjs:v2.0-devfrom
mdehoog:doughnut-rotation
Apr 16, 2016
Merged

Added unit test for doughnut rotation/circumference, fix for rotation = 0#2273
etimberg merged 1 commit intochartjs:v2.0-devfrom
mdehoog:doughnut-rotation

Conversation

@mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Apr 16, 2016

As a follow up for #2271, I've added a unit test that tests the doughnut chart with non-default rotation/circumference properties.

There was a bug in the initial version where a value of 0 for rotation would revert the rotation to the default value of Math.PI * -0.5; this has been fixed.

Also replaced the 1.999999 multiplier in the calculateCircumference function with 2.0, and updated the values in the unit test to suit. The 1.999999 isn't required any more, I believe due to the arc's inRange change in #2271. Using 2.0 allows us to be more accurate in the unit tests.

@etimberg etimberg merged commit b50c281 into chartjs:v2.0-dev Apr 16, 2016
@etimberg
Copy link
Member

Thanks @mdehoog

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 71.863% when pulling 241f085 on mdehoog:doughnut-rotation into af1adf6 on nnnick:v2.0-dev.

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.

3 participants