Skip to main content
100%

Social Network Graph Example

✓ Published0🌍 Public
Aakshayvenishetty1437
Last edited Jul 20, 2023
Created on Jul 20, 2023
Forked from Hello VizHub

A social network graph example visualizes five people (John, Alice, Bob, Eve, Cynthia) as blue circles connected by six friendship links as lines. Using D3 v6, the code employs `d3.forceSimulation` with `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter` to position nodes, while `d3.drag` enables interactive dragging. The SVG rendering updates node positions (`cx`, `cy`) and link coordinates on each simulation tick, with text labels showing names. This demonstrates loading D3 via UNPKG and importing local ES6 modules.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes