javascript - d3 tooltip hovering issue -
i show , hide tooltip on hovering circle. have data in tooltip can have link user want click. problem attached hover function node when try click on tooltip link tooltip hide. try append tooltip inside g of hovering element did not work. suggestion fiddle
nodeenter.append("circle") .attr("r", 10) .style("fill", function(d){ return d._children ? "lightsteelblue" : "white"; }).on('mouseover',function(){ div.style('left',d3.event.pagex+20+'px').style('top',d3.event.pagey+'px').style('visibility','visible') }).on('mouseout',function(){ div.style('visibility','hidden') })
try settimeout in mouseout event.
on('mouseout',function(){ settimeout(function(){div.style('visibility','hidden');}, 2000) })
Comments
Post a Comment