Skip to main content
100%

Tidy Tree vs Dendogram

✓ Published0🌍 Public
Aandrew-reid
Last edited Jul 14, 2017
Created on May 17, 2017

This example animates the same hierarchical dataset through six layout transitions, comparing the tidy tree (d3.tree) and dendogram (d3.cluster) layouts in vertical, horizontal, and radial orientations. The tree keeps sibling nodes at equal depth, while the cluster aligns all leaf nodes at the same level. Using d3.v4 and SVG, the code applies d3.linkVertical, d3.linkHorizontal, and d3.linkRadial to morph paths, with cubic Bézier curves for cluster links. Data is a static nested JSON object rendered as circles and labels.

AI-generated description

This bl.ock mostly just duplicates the cannonical d3.tree and d3.cluster bl.ocks by Mike Bostock. Intended to visualize differences in layout. It proceeds through transitions of:

  • Vertical Tree
  • Vertical Cluster
  • Radial Tree
  • Radial Cluster
  • Horizontal Tree
  • Horizontal Cluster

The difference between cluster and tree (dendogram and tidy tree respectively) is that the cluster puts all childless nodes (terminal nodes) at the same level, while the tree layout places all nodes with the same parent at the same level.

Similar vizzes