This is the simplest treemap diagram I could create. Let me know if you think I can make it tighter.
Build notes:
- It pulls data from a csv file. It uses d3.stratify() to reform links into a hierarchy. (NOTE: I ran into a challenge with
d.size
when moving from json to csv. Whilesize
is a feature of my data, I had to now access it fromd.data.size
.) - To differentiate between local variables and framework objects, I prefix variables with lowercase 'v'.
- The
.paddingOuter(5)
highlights the hierachical grouping. Normally this is achieved via different colors in treemaps.
From https://bl.ocks.org/denjn5/bb835c4fb8923ee65a13008832d2efed