score:36

Accepted answer

Just assign the parent d3 wrapper to a variable:

var g = categorized.enter().append("g");
g.append("circle").style("fill", "#ddd");
g.append("text").text(function(d,i){return d.count});

Related Query

More Query from same tag