javascript - d3.js v4 force diagram update -
trying update force diagram nodes , links exist in current diagram. example, have simple diagram 2 nodes , b , link between them "a" --> "b".
i wondering correct way of handling if node, same, added.
in fiddle i've put , in personal development end duplicates, thought handled in
.data(nodes, function(d) { return d.id; })
and links appropriate data function (for example .data(links, function(d) { return d.target; })
)
ideally, i'm looking "nothing happen" when same node/ link added. hopefully, makes sense, please see fiddle example here
Comments
Post a Comment