I've been trying, step by step, to convert some very nice but static & non-d3 chordname-to-waveform code for dynamic animation in a d3.js visualisation.
I've now reached a point where I have (in particular) two fully defined GUI elements, the first of which (plot) is already attached to the DOM:
var plot = plotframe
.append("svg")
.attr("whatever", ....
.. and the second (path, defined but as yet DOM-unattached) created using the following curious syntax:
var path = d3.select(document.createElementNS(d3.ns.prefix.svg, "svg:path"))
.attr("id", "path")
.attr("whatever", ....
Prior to my changes (these elements becoming the subject of d3 selections), the raw elements were hooked up using:
plot.appendChild(path);
However, as path is subject to some cute wave-building algorithms which it would be a shame to disturb, how could I do a purely retrospective attach of (the now both d3 selections) path to plot? Something similar to appendChild, but d3-friendly.. Does d3.js cater for this at all?
I'm aware this resembles an earlier question, but the answer provided there is clearly not what I'm looking for.
Thanks Thug