Closed egeola closed 1 year ago
I am having the same issue with these numbers: const series = [3, 8, 2, 3, 0, 0]; const sliceColor = [colors.lightYellow, colors.lightBlue, colors.lightPink, colors.lightGreen, colors.lightPurple, colors.light_grey];
This gives me a completely gray donut too. If I change the order of the numbers 3,8,2,3 will still give a gray donut except when one of them occupies the last position. If I change any of the numbers, it will give me the correct proportions.
I'm closing this because it's quite old and I couldn't re-produce it. Fee free to open this, or open a new issue if it's still a problem.
Hello, FYI I'm having the same issue.
Here are the series that cause the problem :
[13, 1, 0, 1, 1, 0]
[14, 0, 1, 0, 1, 0]
I manage to reproduce the bug with @misheki series [3, 8, 2, 3, 0, 0]
the sliceColor
array is the same length of my series.
if i change one number of the series above, it works as expected
In my case, the only thing I notice is the fact that the sum is 16
and the last number is 0
... it doesn't really help :(
I might use this one instead
Thanks for testing! I'll have a look.
Seems that it was the same issue reported in https://github.com/genexu/react-native-pie-chart/issues/33
Fixed now in 2.1.0
This gives me a completely green donut.
const chart_wh = 300 const series = [7, 2, 13, 0] const sliceColor = ['#F44336','#2196F3','#FFEB3B', '#4CAF50']
Adding an extra 0 to series gives me the right proportions though const chart_wh = 300 const series = [7, 2, 13, 0, 0] const sliceColor = ['#F44336','#2196F3','#FFEB3B', '#4CAF50']