D3 Starter
✓ Published0🌍 Public
This example demonstrates three different layout methods for hierarchical music data—a labeled tree layout, an interactive force-directed graph, and a subtree view—all rendered as SVG. The data is read from a CSV file containing record labels, artists, and albums, converted into a hierarchy. The code uses D3 v7’s `tree`, `hierarchy`, `linkHorizontal`, and `forceSimulation` APIs to construct the layouts. The force-directed version includes dragging interactions via `drag`, allowing users to reposition nodes while the simulation updates positions on each tick.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed