score:1

The answer, thanks to Lars again, was to add a key function to the links and nodes:

  var link = svg.selectAll(".link")
    .data(scope.links, function (d) {
      return d.source.data._id + '|' + d.target.data._id;
    });

  var node = svg.selectAll(".node")
    .data(scope.nodes, function (d) {
      return d.data._id;
    });

Thanks Lars!


Related Query

More Query from same tag