🌍 Public
Viewing a saved revision (read-only)
ba2309b50cd94c09a03abea1c3354d8d
Fork of Fork of Fork of React & D3 Starter
This example shows a network of six cities connected by airline-style routes, with nodes and links arranged through a force-directed layout. The visualization uses `d3.forceSimulation` with `forceLink`, `forceManyBody`, and `forceCenter` to position the cities and update their coordinates on each tick. Links are rendered as gray SVG lines and nodes as orange circles, with city names displayed as SVG text labels. The code loads D3 v7 directly in an HTML file and appends all elements to the SVG, while a separate React component in `index.jsx` demonstrates a basic D3-React integration.
AI-generated description