javascript - D3.js appending svg/dom element not working -
so i'm trying append dom or svg element circle(the latter avoid foreign object thing). i'm doing this
var tooltip = d3.select(this).append("text") .attr("class", "tooltip") .text("hello") .attr('x', 1000) .attr('y', 1000);
where circle svg element.
however, doesn't work -
but can't see effect on webpage.
why?
in svg, can't append text
element circle
elements -- specification doesn't allow that. append them g
elements or top-level svg, otherwise won't displayed.
Comments
Post a Comment