Skip to main content
100%

Circle Packing

✓ Published0🌍 Public
CCalvin Gomez
Last edited May 18, 2020
Created on May 18, 2020
Forked from Blank Canvas

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 description
MIT Licensed

Similar vizzes