I changed child to children, of course, and have this fiddle. Is this what you want?

I have done nothing special except for the change above. The numbers coming from the different levels correspond to the tree depth, as can be seen in the corresponding text element:

.text(function(d) { return d.depth + ": " + d.size;});

Related Query

More Query from same tag