Skip to main content
100%

Wavy treemap

✓ Published0🌍 Public
KKcnarf
Last edited Dec 3, 2018
Created on Jan 23, 2017

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 description

This 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:

gpl-3.0 Licensed

Similar vizzes