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 -

enter image description here

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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -