block by mpmckenna8 1bdbff541a7f47909c5b1471748b5638

Vertical Tree diagram with v4 and collapsing and expanding

Full Screen

A little thing to try to show how to make a top down collapsable tree map with d3 v4. It’s not a great example and has a number of extraneous functions as I was messing around just trying to learn how to use this layout a little bit.

Mostly copied from: https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd

But hopefully I’m going to hack it so show how to max and or min heapify an array of numerical data. But transitions in d3 are hard…

But for a great and maybe more useful viz that works and has a decent explanation of how to use a heap data structure check out http://www.benfrederickson.com/heap-visualization/

index.html

heaper.js

style.css