There are numerous examples of force-directed graphs (i.e. nodes and links) and collapsible trees (i.e. parent-child nodes) but I cant find an example of the combination of thes
i try to merge both examples here my fiddle
// Toggle children on click.
function click(d) {
if (d.children) {
d._children = d.children;
d.children = null;
} else {
d.children = d._children;
d._children = null;
}
update();
}
Here is a nice example that exhibits both properties http://bl.ocks.org/mbostock/1093130
I'm also interested in this. I have found two examples, that I'd like to combine.
http://bl.ocks.org/mbostock/1062288 http://graus.nu/d3/