Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Pack Layouts

Public visualization

Viewing a saved revision (read-only)

c96e11099ebe4f1b9acc3fa4e476f255

Fork of D3 Pack Layouts

0 stars0🌍 Public
RRustamova Malakkhanim
Last edited Mar 13, 2024
Created on Mar 13, 2024
Forked from D3 Pack Layouts

This example shows a hierarchical dataset with nested nodes (A1, B1, C1–C3, B2) displayed as a circle-packing layout, where each node’s bubble size reflects its numeric value. The code uses D3’s `d3.pack()` and `d3.hierarchy()` to compute the layout, with `rootNode.sum()` summing child values for sizing. An SVG canvas is created and sized to the container, and descendant nodes are selected for rendering. The visualization relies on D3 7.8.5 and the `index.js` module exports a `main` function that drives the layout generation and SVG setup.

AI-generated description

D3 Hierarchies