Skip to main content
100%

Graph

✓ Published0🌍 Public
Hhaiyangwhy1015
Last edited Feb 24, 2021
Created on Feb 23, 2021

This example visualizes a network of board game relationships as an interactive force-directed graph. Nodes represent distinct games and are rendered as small circles, while curved paths between them show connections weighted by a numeric value. The visualization uses `d3.forceSimulation` with link, charge, centering, and X/Y forces to position nodes, and supports dragging with `d3.drag` to manually reposition elements. The graph reads its source and target pairs from a imported CSV file, with SVG elements styled via external CSS.

AI-generated description

Boilerplate code for a React + D3 visualization with:

  • CDN links for React, ReactDOM, and D3
  • Basic React boilerplate
  • Variables for dimensions and margins
  • A VizContainer component that:
    • Abstracts SVG/group container elements
    • Follows the margin convention
    • Show the margins, which can be easily removed by deleting the showMargins={true} prop
MIT Licensed

Similar vizzes