🌍 Public
Viewing a saved revision (read-only)
cdfa07a5eb3b414db682a1a82b49cf24
Exercise 2.1 (b)
This example compares five treemap layout algorithms by rendering the same hierarchical dataset with each one side by side. The page displays five separate SVG charts, one for each D3 layout mode: treemapBinary, treemapDice, treemapSlice, treemapSliceDice, and treemapSquarify. Each SVG uses d3.hierarchy and d3.treemap to compute node positions, with rectangles styled in dark blue and semi-transparent. The layout names appear above each chart, while leaf nodes show their data labels inside the colored rectangles.
AI-generated description