HTML Treemapper

October 25, 2017

A treemap is a graphical representation of tree-structured data. The rectangular chart is subdivided into rectangles for each node of the tree, with child nodes nested within it.

My goal with the HTML Treemapper app was to use D3.js to generate svg treemaps given inputted HTML content. The user can choose whether to a treemap that represents the relative size of each DOM element, or one that gives equal weight to each “leaf” node.

HTML often contains elements that have just one child. For example, an <img> nested within an <a> nested within an <li>. I chose to treat such elements as a single leaf node.

Visit site

Leave a Reply

Also in Portfolio