{"version":"1.0","type":"rich","title":"Simple Tree and Cluster Demo","description":"This example displays the same hierarchical JSON dataset as two different D3 layouts: a tree and a cluster. Users toggle between the two views using the \"Tree\" and \"Cluster\" buttons, which trigger an `update` function that rebuilds the visualization. The code uses `d3.layout.tree()` and `d3.layout.cluster()` to compute node positions, and `d3.svg.diagonal()` to draw curved links between parent and child nodes. Each node is rendered as a circle with a text label, and the SVG canvas is recreated on every layout change.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-2964485?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}