2
這裏沒有做任何奇怪的事情。但我似乎無法讓他們與圈子的外緣相匹配。任何幫助,將不勝感激。爲什麼我的D3力佈局圖線延伸到圓圈?
// Create Nodes
var node = svg.selectAll(".node")
.data(force.nodes())
.enter().append("g")
//.group(d.group)
.attr("class", "node")
.on("mouseover", nodeMouseover)
.on("mouseout", nodeMouseout)
.call(force.drag);
// Append circles to Nodes
var circle = node.append("circle")
.attr("r", 8)
.style("stroke", function (d) { return d.BaseColor; })
.attr("id", function (d) { return d.ID; })
var link = svg.selectAll(".link")
.data(force.links())
.append("line")
.attr("class", "link arrow")
// Draw lines for Links between Nodes
var link = svg.selectAll(".link")
.data(force.links())
.append("line")
.attr("class", "link arrow")
感謝擡起頭來;在我看到你的帖子之前,燈泡就在我身邊。 –