score:1

Accepted answer

How about:

.on("mouseover", function(){
   var pos = d3.mouse(this);
   tooltip.text(xScale.invert(pos[0]).toFixed(1) + ' , ' + yScale.invert(pos[1]).toFixed(1));
   return tooltip.style("visibility", "visible");
 })

Updated code.


Related Query

More Query from same tag