显示具有多个父节点的D3树 [英] Displaying a D3 tree with multiple parents

查看:661
本文介绍了显示具有多个父节点的D3树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前已执行图表,我希望保留结构和可折叠性描绘具有多个父节点的子节点。有没有办法做到这一点?我研究了力图,但我也想保留一个层次结构(意味着1级的父级可以有一个孩子,级别3显示)。经过大量的研究和修改我目前的代码,我无法解决我的问题。有没有人有任何经验与显示一个D3树节点与多个父母?

I currently have this graph implemented and I'm hoping to keep the structure and collapsibility while depicting a child node having multiple parents. Is there a way to do this? I looked into force graphs but I'm also wanting to preserve a set hierarchy (meaning a parent at level 1 can have a child and level 3 shown). After a lot of research and tinkering with my current code, I am unable to figure my issues out. Is there anyone who has any experience with displaying a D3 tree node with multiple parents?

推荐答案

为了防止任何人想知道我做了什么来回答我的问题。我最终使一个力图表现与树的方式相同。这给了我有可能有多个父母,我只是不得不做一些小费用如何使用力量,以保持层次结构。

Just in case anyone was wondering what I did to answer my question. I ended up making a force diagram behave in the same manner as a tree. This provided me the possibility of having multiple parents and I just had to do some fiddling with how the diagram used forces in order to preserve hierarchy.

这篇关于显示具有多个父节点的D3树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆