Reputation: 435
I'm trying to do something like this:
In d3.js. I can draw the donut chart fine but I'm struggling on how I can have multiple colors within an arc. Is there a way I plot multiple arcs within the same arc and style them independently?
Upvotes: 1
Views: 193
Reputation: 7687
Rather than putting multiple colors within a single arc, I would recommend having a single arc for each color. This way, if your data changes, you can just change the lengths of each arc, rather than changing the gradient you're using.
A good example of this is here: d3 gallery donut chart
Upvotes: 1