{"version":"1.0","type":"rich","title":"Modifying a Force Layout with buttons","description":"Three buttons step through a force-directed graph animation, adding and removing nodes and links to show how a D3 v4 force layout handles dynamic data. The example demonstrates smooth enter and exit transitions for both circles and lines, with `d3.forceSimulation` driving the physics. A key technique is `transition.attrTween`, which keeps exiting links visually connected to moving nodes during removal, even after the links leave the `link` selection. The reset button restores the initial three-node state.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-2f7219a4f52b572a3ca7da91a25681f9?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}