0
如何更改此代碼以在d3工具提示中繪製圖像?javascript/d3 - 工具提示中的圖像
var tip = d3.tip()
.attr('class', 'd3heatmap-tip')
.html(function(d, i) {
return "<table>" +
"<tr><th align=\"right\">Row</th><td>" + htmlEscape(data.rows[d.row]) + "</td></tr>" +
"<tr><th align=\"right\">Column</th><td>" + htmlEscape(data.cols[d.col]) + "</td></tr>" +
"<tr><th align=\"right\">Value</th><td>" + htmlEscape(d.label) + "</td></tr>" +
"</table>";
})
.direction("se")
.style("position", "fixed");
不幸的是,我不知道在這種情況下,構成了重複的例子...
使用一個img標籤而不是我想的表。 –