Automatic Text Sizing
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Feb 16, 2012
A circle-packing diagram displays the hierarchical Flare dataset, sizing each bubble by leaf-node value and placing every label inside its circle. The visualization uses the d3.layout.pack layout to compute circle positions and radii, then renders SVG circles and text. Each label’s font size is calculated dynamically using `getComputedTextLength` and the circle’s radius, shrinking text automatically to fit within the available space. Hovering highlights a node’s circle in orange.
AI-generated descriptiongpl-3.0 Licensed