I am trying to add labels to the bilevel sunburst / partition shown here - http://bl.ocks.org/mbostock/5944371:
Indeed one modified line is missing in "2.". In function zoom(root, p)
, you should also add a line after path = path.data(partition ... .key; });
:
path = path.data(partition.nodes(root).slice(1), function (d) {
return d.key;
});
text = text.data(partition.nodes(root).slice(1), function (d) {
return d.key;
});