I have included div's inside svg using foreignObject (I tried to use rect instead of div's, as in this example, but extendability-wise, the best option is div).
I want to add an svg circle at the end of each div of a particular class. The above example adds circles to all the elements, but now I want to filter them with a class selector. How can I achieve this with d3?
var leafnodes = new Array();
d3.select("#input-container-div").selectAll(".leaf")
.each(function () {
leafnodes.push(d3.select(this).style("top"));
});
I used the above code but results in "0px" since the CSS of it does not define a value for "top".
I also tried the solution on this question, but for some reason it does not work.
foreignObject
.