treemap2
This interactive treemap visualizes the flare.json dataset, where each cell’s area and color both encode the data value. A custom `d3.layout.treemap2` extension of `d3.layout.treemap` computes the maximum area among sibling nodes; cell fill interpolates between lightgray and a material orange via `d3.interpolateHsl`. Clicking a cell zooms into its parent group, and a dropdown switches the value metric between size and count. The layout sorts children to place the largest cell in the top-right.
AI-generated descriptiona treemap prototype where the
- area of the cell
- the maxArea of all the cells that share the same depth and same parent with that cell
is used to scale the color on an orange to lightgray colorscale.
the size variable is double-encoded as cell area and cell color.
I extend d3.layout.treemap to calculate the maxArea across a set of sibling nodes and call the extended layout d3.layout.treemap2
the sort property of the treemap2 layout positions the largest area cell in the top-right of the group.
.sort(function(a, b){ return a.value - b.value })
an iteration on http://mbostock.github.io/d3/talk/20111018/treemap.html
and this StackOverflow Answer
forked from <a href='http://bl.ocks.org/micahstubbs/'>micahstubbs</a>'s block: <a href='http://bl.ocks.org/micahstubbs/6eed3b92121facaf489f'>treemap2</a>