Wavy treemap
This visualization shows the D3.js source code as a treemap where rectangular cells are distorted into a wavy, custom shape. The layout uses a standard `d3.treemap` with `d3.stratify` to structure the data, then applies custom distortion functions to the computed rectangles, converting them into SVG paths. The wavy warping is animated over five seconds using a transition, with the final shape approximating the D3 logo. Hovering a cell reveals its file path and line count in a tooltip.
AI-generated descriptionThis block is a continuation of a previous block. Compared to the previous block (which was a recreation), this one aims to be a more realistic use case, and illustrates how one can distord a treemap in order to fit a particular shape.
This block vizualises the treemap of the D3'source code (data comes from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/8fe6fa6ed1fa976e5dd76cfa4d816fec'>D3 Source Treemap</a>). Hold on your mouse on a cell for some details.
Acknowledgments to:
- D3.js (v4)
- blockbuilder.org