如何用d3制作交互式树形图?

时间:2012-11-28 06:49:10

标签: charts treeview d3.js

有没有关于如何设计交互式树形图的样本,例如在pearltrees.com网站上(例如参见here)与D3?

感谢您的帮助!

1 个答案:

答案 0 :(得分:3)

您可以创建一个强制导向图来执行以下操作:

http://mbostock.github.com/d3/talk/20110921/#20

你需要做一些工作:

  1. 动态添加图像到节点(this example adds a favicon到每个节点)
  2. 允许用户展开/折叠部分树。 (this example does this, but uses a tree layout)。
  3. 将HTML链接添加到结束节点(this example shows how nodes can link out to other pages)。
相关问题