I'm trying to get this text to display on mouseover but it's not working, can anyone give some insights? There are multiple circles in the document and I want each one to display overhead text on mouseover. Current form should be displaying "hello"s everywhere but there's nothing.
d3.selectAll("circle")
.on("mouseover",function(d){
var x = parseFloat( d3.select(this).attr("cx") );
var y = parseFloat( d3.select(this).attr("cy") );
d3.selectAll("circle")
.append("text")
.attr("class","tooltipText")
.attr("x",x)
.attr("y",y)
.attr("stroke-width",1)
.attr("fill", "white")
.attr("font-size", "13px")
.attr("text-anchor", "middle")
.text(function(){
return "hello";
});
});