The following example shows a donut chart in D3.js, is it possible to add more than one ring to the chart?
var dataset = {
apples: [53245, 28479, 19697, 24
Yes, you can do this quite easily. The key is to use nested selections. That is, you pass in your top level list of lists and create a container element for each list. Then you do the nested selection and draw the actual elements. In this particular case, you also need to adjust the radii of the arcs so that they don't overlap.
var gs = svg.selectAll("g").data(d3.values(dataset)).enter().append("g");
var path = gs.selectAll("path")
.data(function(d) { return pie(d); })
.enter().append("path")
.attr("fill", function(d, i) { return color(i); })
.attr("d", function(d, i, j) {
return arc.innerRadius(10+cwidth*j).outerRadius(cwidth*(j+1))(d);
});
Updated jsfiddle here.