Skip to main content
100%

visualization9d3

✓ Published0🌍 Public
GGanesh Gundekarla
Last edited Apr 26, 2025
Created on Apr 26, 2025
Forked from HTML Starter

A D3.js treemap displays hierarchical data as nested rectangular nodes, sized proportionally to each value. The visualization shows five course categories with descending values, using a spectral color scale for differentiation. The code embeds a static dataset directly and builds the hierarchy using `d3.hierarchy` with a sum accessor, then applies `d3.treemap` to compute the layout. Each leaf node renders as a positioned `div` element, with dimensions derived from the treemap’s computed coordinates and colors assigned via `d3.interpolateSpectral`.

AI-generated description
MIT Licensed

Similar vizzes