Skip to main content
100%

Force Directed Graph - Simple

✓ Published1🌍 Public
JJimMaltby
Last edited Dec 16, 2020
Created on Dec 14, 2020

This example shows a force-directed graph built from hierarchical data stored in a flat CSV file. The visualization converts the parent-child relationships into a network layout using `d3.stratify`, then renders the resulting nodes as circles positioned by the `d3.forceSimulation` with link, charge, and center forces. The example uses D3 v5 to load the data with `d3.csv`, applies a paired color scale to nodes based on their parent, and draws the output as SVG elements. The code includes commented-out drag and tooltip interactions that are not active in the final rendering.

AI-generated description

A simple FDG to fork VizHub. To help work out using flat data for hiearchies

MIT Licensed

Similar vizzes