Updating D3 force layouts - adding and removing nodes corrupt the page
问题 First of all apologies to all for effectively opening a duplicate question to my last one (D3: problems with node = vis.selectAll(".node")) but initially I thought I could do this would jsfiddle, however it never really worked. The two problems are the same, so it might be worth reading the other one before this one. The issue I have is in updating the force layout with new nodes. In reality, I have an ajax call every few seconds to get updated data and I have reams of code to parse it and