【发布时间】:2020-12-18 01:46:30
【问题描述】:
我想将 <abbr> 添加到 SVG 的 <text> 标记,最终结果类似于 <text><abbr title="Goals Per Match">GPM</abbr></text>。我没有运气,所以我想知道这只是我的实现还是 SVG 无法实现。
这是我目前的实现方式:
svg.append("text")
.attr("id", "club_label")
.attr("x", width / 2 + 5 )
.attr("y", height )
.attr("fill", "white")
.style("text-anchor", "middle")
.append("abbr")
.attr("title", "Goals Per Match")
.text("GPM");
【问题讨论】:
标签: javascript svg d3.js