VividD
VividD

Reputation: 10536

Cheese diagram in d3.js

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)

Upvotes: 0

Views: 852

Answers (1)

Lars Kotthoff
Lars Kotthoff

Reputation: 109242

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.

Upvotes: 1

Related Questions