🌍 Public
Viewing a saved revision (read-only)
58138bc4c248471f8b50359fe1f87e13
Force-Directed Graph complete
This example shows a force-directed graph of animal taxonomy, with nodes representing categories like mammals, insects, and fish, and links connecting parent groups to their subcategories. The simulation uses `d3.forceSimulation` with `forceLink`, `forceManyBody`, and `forceCenter` to position the nodes, while node color distinguishes hierarchy levels (red for top-level, gray for subcategories). The data is defined as static arrays of nodes and links, with link strengths influencing the layout. Node labels are rendered as text elements, and dragging is supported via d3’s `drag` module.
AI-generated description