I have been transitioning my code from JIT to D3, and working with the tree layout. I have replicated the code from http://mbostock.github.com/d3/talk/20111018/tree.html with my tree data, but I wanted to do a little more.
In my case I wanted to create child nodes that merge back to form a parent at a lower level, which I realize is more of a directed graph structure, but would like the tree to accomodate this (i.e. notice that common id's between child nodes should merge).
So basically a tree that divides like normal on the way from parents to children, but then also has the ability to bring those children nodes together to be parents (sort of an incestual relationship or something :)).
Asks something similar -> How to layout a non-tree hierarchy with D3
It sounds like I might be able to use hierarchical edge bundling in conjunction with the tree hierarchy layout, but I haven't seen that done. I might be a little off with that though.
I've been working on a library, called dagre, for laying out directed graphs in the JavaScript. We have an example for how it can be used with D3. Maybe this suits your needs?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With