0
我有以下D3代碼。將文本部分放在文本框中,鼠標懸停在D3上
var tooltip= d3.select("body").append("div")
.style("position", "absolute").style("display", "none")
circ.on("mouseover", function(d){ //circ is a circle
tooltip.html(d.venue +"<br/>" + d.var2 + ", " + d.var3)
.style('left', (d3.event.pageX - 30) + 'px') // Showing the d.count
.style('top', (d3.event.pageY - 30 + 'px')
.style("font-size","10px")
.style("padding", "5px")
.style("display", "block")
.style("background", "White")
.style("color","black") //font color
我要大膽會場(d.venue)僅需要一條線,並在評論框的下一行,剩下的兩個變量,而大膽地得到。