Circle Packing
✓ Published0🌍 Public
This example visualizes hierarchical data as nested circles using a circle packing layout. The circles, sized by each node’s `value` and sorted by descending value, are filled with colors from the magma sequential scale. The chart uses the `d3.pack` and `d3.hierarchy` APIs to compute the layout, while `d3.scaleSequential` and `d3.interpolateMagma` handle color mapping. Rendered as SVG in a full-screen viewport, the code imports all required functions from the d3 library and applies a fixed 3-pixel padding between circles.
AI-generated descriptionMIT Licensed