you said you need tooltip, right?(你说你需要工具提示,对吗?)
In my previous project, I have used title as a tooltip.(在上一个项目中,我使用title作为工具提示。) I think title is the easy way to show as a tooltip.(我认为标题是显示为工具提示的简单方法。) have u tried it?(你尝试过吗?) maybe i have used something like .append("svg:title")
.(也许我使用了.append("svg:title")
。) also i had bookmarks a link, this link give you details about tooltip in d3.js.(我也有一个书签链接,此链接为您提供了有关d3.js中工具提示的详细信息。) this link contain live example of tooltip, d3 tooltip(此链接包含d3工具提示的实时示例)
d3.select(".example_div svg")
.append("svg:circle")
.on("mouseover", function(){return tooltip.style("visibility", "visible");})
.on("mousemove", function(){return tooltip.style("top", (event.pageY-10)+"px").style("left",(event.pageX+10)+"px");})
.on("mouseout", function(){return tooltip.style("visibility", "hidden");});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…