Hierarchical data
D3 provides several layout functions that transform hierarchical data structures by adding properties and methods that facilitate their rendering as hierarchical visualizations. While D3 doesn't automatically generate hierarchical charts, it computes coordinates, angles, distances, and other values that can easily be bound to properties of SVG circles, rectangles, lines, curves, and text, using the general update pattern.
A hierarchical dataset is a recursive structure that contains objects that link to a parent node and an array of child nodes. Nodes that have no children are leaf nodes; the root node has a null parent. We created some hierarchical structures in Chapter 4, Data Binding with the d3.nest() and d3.group() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access