Treemap
A treemap visualizes the hierarchical structure of the Flare visualization toolkit, with each rectangle’s area proportional to a node’s value and color encoding its parent package. A control toggles between summing sizes and counting leaves, triggering animated transitions that re-layout the rectangles. The code uses d3.hierarchy, d3.treemap with the d3.treemapResquarify tile, d3.scaleOrdinal with a fader on d3.schemeCategory20, and clips text labels with SVG clipPath elements. Data comes from the bundled flare.json file.
AI-generated descriptionA treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode different packages of the Flare visualization toolkit. Treemap design invented by Ben Shneiderman. Squarified algorithm by Bruls, Huizing and van Wijk. Data courtesy Jeff Heer.
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4063582'>Treemap</a>