使用d3(具有多个父节点的树)自动布局的图形

时间:2014-04-02 16:24:27

标签: graph d3.js tree

如何使用自动布局绘制图形,多对多线条不使用d3穿过方框?

我想做到这样的事情: http://www.graphdracula.net/showcase/ http://live.yworks.com/yfiles-for-html/1.1/demos/DataBinding/demo.yfiles.binding.interactivegraphsource/index.html

我想这是对我所需要的最好的描述(像树一样,但有多个父母): enter image description here

3 个答案:

答案 0 :(得分:4)

Dagre-d3是我找到的最佳解决方案:

https://github.com/cpettitt/dagre-d3

答案 1 :(得分:2)

对于遇到此问题的任何其他人,这里有另一种可能的解决方案:(参见"带有向下指向边缘的"定向图"示例)

http://marvl.infotech.monash.edu/webcola/

它也可以插入d3.js并用来代替力布局。

答案 2 :(得分:0)

要最小化线交叉,您可能需要分层的有向图布局。只是谷歌那句话。