🌍 Public
Viewing a saved revision (read-only)
cc20a8206cee40cd816e38664739f7e6
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