[英]How to change infowindow captions in d3heatmap in R from the default?
我有同樣的問題。 解決方案是“hacky”,但是會得到你想要的。 你需要在d3heatmap庫中找到heatmapcore.js文件:d3heatmap / htmlwidgets / lib / d3heatmapcore / heatmapcore.js
找到以下行:
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");
您可以將“行”,“列”和“值”替換為所需的文本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.