🌍 Public
Viewing a saved revision (read-only)
3b7f4dd077f048429e466d91535cdb89
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