Relationship Graph with D3

你。 提交于 2019-12-10 10:05:12

问题


How would I create the following graph with D3? I don't know the name for this type of visualization, and the closest I could find were "force-directed" graphs.

Legend: Filled nodes are people, non-filled nodes are attributes (e.g. favorite color).


回答1:


This is my version: http://jsfiddle.net/doraeimo/JEcdS/embedded/result/ which is easy to show system performance and network flow.

code is not here



回答2:


Hacked together a gross but working version: http://bl.ocks.org/hijonathan/5793014

Basically, I started with an array of people nodes that had some properties on them. I then loop through that and generate new nodes for each property, adding a target to it to link it back to the original node.

From there, you can use properties set on those two node types to style them and create corresponding nodes.



来源:https://stackoverflow.com/questions/17136530/relationship-graph-with-d3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!