I am using this example http://bl.ocks.org/danielatkin/57ea2f55b79ae686dfc7 and I am trying to add some text in the circle.
This is how the circles are created and placed
var nodes = svg.selectAll("circle")
.data(data);
nodes.enter().append("circle")
.attr("class", function (d, i) { return "circle_"+d.sentiment+" circle_"+i})
.attr("cx", function (d) { return d.x; })
.attr("cy", function (d) { return d.x; })
.attr("r", function (d) { return d.radius; })
.style("fill", function (d, i) { return colors['default']; })
.on("mouseover", function (d) { showPopover.call(this, d); })
.on("mouseout", function (d) { removePopovers(this, true); })
.call(pulse, function(d){ return d.radius+4; }, function(d){return d.radius; });
But I am getting no clue on how to add text to these circles.
I have already reffered this and this answer but couldn't succeed. The issue is that after following the above answers my circles stuck in a diagonal line.
Can someone tell me how to do this?