Question

How would you implement this with d3.js:

enter image description here

I started with sunburst diagram, but how to handle pics around circle? How to rotate them? etc. (assume each cheese has its png pic)

Was it helpful?

Solution

To add images, you can use the SVG image tag. The elements added in this way can be translated and rotated in the usual manner. The code you're going to need is essentially the same as for a pie chart with rotated labels, for which you should be able to find plenty of examples.

Here's a quick and dirty modified pie chart example that demonstrates the technique.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top