You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 735 of pizza.js, there's for loop. Just add a check if the value is equal to total sum, and subtract some small angle so that start and end do not match. You can update the loop like this:
for (var i = 0; i < data.length; i++) {
angles[i] = data[i].value / total * Math.PI * 2;
if(data[i].value == total) angles[i] = Math.PI * 2 - 0.0001; // if this one takes 100%, e.g the rest is zero or it is the only one
}
Hi,
How do I make it work if values are 100 & 0% - it does not display the full circle for 100.
It works brilliantly of it's 99 & 1%
Please suggest if this is made to work for 100%
Thanks
The text was updated successfully, but these errors were encountered: