问题
Mike Bostock has an example regarding updating a force layout. The example is based on v3 — how can the same functionality be replicated in v4?
Here's my (pitiful) attempt.
I've read the changes to selections in the v4 Changelog, but the merge
call is still confusing. In particular, it's not clear to me how the data join interacts with the simulation nodes()
and links()
call.
来源:https://stackoverflow.com/questions/38623530/d3-v4-update-force-layout