我有一个数据集,它定义了在力有向图中使用的许多节点。看起来像...
var nodeSet = [
{id: "N1", name: "Node 1", type: "Type 1", hlink: "http://www.if4it.com"},
{id: "N2", name: "Node 2", type: "Type 3", hlink: "http://www.if4it.com/glossary.html"},
{id: "N3", name: "Node 3", type: "Type 4", hlink: "http://www.if4it.com/resources.html"},
{id: "N4", name: "Node 4", type: "Type 5", hlink: "http://www.if4it.com/taxonomy.html"},
{id: "N5", name: "Node 5", type: "Type 1", hlink: "http://www.if4it.com/disciplines.html"}
];
如何专门告诉 d3.js 库中的 force.layout 使用 id = "N1" 的 "Node 1" 作为主根或焦点节点?