🌍 Public
Viewing a saved revision (read-only)
c2ddd36a62f44e81a0e525ab0d529eef
activity 6_Task 2
This example shows a clustered force-directed network of nodes and links, with each cluster assigned a distinct color and labeled by a numeric ID. It uses `d3.forceSimulation` with `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter` to position the nodes, while `d3.drag` enables interactive node movement. The labels are rendered as SVG text elements, and the visualization reads its data from a remote JSON source. Node positions update continuously through the simulation’s `tick` event, redrawing both the connected links and the labeled nodes.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.