Skip to main content
100%

Untitled

✓ Published0🌍 Public
JJediquu
Last edited May 9, 2023
Created on May 8, 2023
Forked from HTML Starter

This interactive network diagram uses a force-directed layout to display a small hierarchical dataset from a JSON file. The visualization distinguishes node types by color: blue for collapsed packages, light blue for expanded ones, and orange for leaf nodes. Users can click any node to expand or collapse its children, triggering a re-layout. The code leverages the D3.js v3 layout APIs, specifically `d3.layout.force` for the simulation and `d3.layout.tree` to generate links. The force simulation is configured with custom `linkDistance`, `charge`, and `gravity` parameters, and the rendering is done as an SVG with click-to-toggle interaction.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes