Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Force Graph Test

Public visualization

Viewing a saved revision (read-only)

72791253800b42c18aef681dac5f4342

Force Graph Test

0 stars0🌍 Public
PPhilHarrigan
Last edited Apr 13, 2022
Created on Apr 13, 2022
Forked from HTML Starter

This example illustrates a force-directed graph that visualizes simple connections among leaders and locations, with data defined directly in the `data.js` file. The visualization uses the `d3.forceSimulation` API to run a physics-based layout, combining `forceManyBody` for repulsion, `forceLink` for attraction between connected nodes, and `forceCenter` to keep the elements centered. The SVG output displays green circles for each node and black lines for each link, with labels added via `select` and `append` methods. The simulation updates the positions of these elements on each tick, offering an interactive, dynamic view of the relationships.

AI-generated description