react-native-pie-chart icon indicating copy to clipboard operation
react-native-pie-chart copied to clipboard

Error in rendering pie chart (angle greater than 360)

Open acapellacci opened this issue 3 years ago • 4 comments

With this series

[789669, 530000, 40149, 3236, 16358, 26]

in index.tsx, the expression

previous[previous.length - 1] + Math.round((360 * current) / sum)

returns an angle greater than 360.

Math.round should be changed in Math.floor

acapellacci avatar Jan 31 '22 10:01 acapellacci

Thanks for catching this @acapellacci . Are you keen to send a PR? To keep the credit? Otherwise, I can fix it myself.

aidin36 avatar Jan 31 '22 21:01 aidin36

Thanks for catching this @acapellacci . Are you keen to send a PR? To keep the credit? Otherwise, I can fix it myself.

@aidin36 Fix it yourself, please.

acapellacci avatar Feb 01 '22 08:02 acapellacci

can you submit a new release with this fix? also ran into this issue, this commit seems to solve my case

andordavoti avatar May 31 '22 13:05 andordavoti

can you submit a new release with this fix? also ran into this issue, this commit seems to solve my case

unfortunately I do not have writing privileges. The owner should do that.

acapellacci avatar Jul 18 '22 15:07 acapellacci

Sorry for the long delay. It's now published in 2.1.0 version.

aidin36 avatar Dec 09 '22 00:12 aidin36