In this post, we'll make an SVG donut chart with clickable slices/parts. I'll start by explaining the issue with the most common way to implement a...
For further actions, you may consider blocking this person and/or reporting abuse
That's really an interesting article, thank you Mustapha for the great explanation
One drawback I noticed is that in the case of only one segment and it is set to 100% then the path will disappear if it's 99.999 it will work!!
Hey Hassan thank you for your feedback.
Good catch indeed! (i’ll edit the post, to mention this :)
Hey Hasan, I just noticed the same thing. The solution below only adjusts the drawing logic, and not the underlying data (so your slices are still accurate). Its ugly, unfortunately I couldn't solve it any more elegantly, but it works for me:
awesome!!
nicely explained all the attributes of an svg arc
Any ideas why my second slice has a droop in the inner arc? I tried all variations of flags :D
Hello there,
I can only guess that the radius of the inner cercle is wrong, it should be 20 instead of 30 (the flags are good ^^) 👇
Yes, that was it! How do you understand the radius x/y? Having a hard time with that part conceptually.
That is great!❤
Thank you 🙏🙏