A leaf node is a node at the lowest level of a hierarchy: it has no child nodes. A hierarchy has one root, branches through intermediate nodes, and ends with leaves. In a language-family visualization, the languages form the leaf nodes. section 11.0
D3 represents hierarchical data with a root object. Its leaves() method returns only nodes without children, while descendants() returns every node. This distinction is useful when a chart needs leaf-specific values, such as sizing circles by the number of language speakers. section 11.5 section 11.3.2
In a D3 tree chart, leaf nodes receive specialized visual treatment:
- Select the complete descendants array so that links, intermediate nodes, and leaves can be drawn together. section 11.3.2
- Identify leaves through the absence of children or, in the demonstrated dataset, a terminal depth value. section 11.3.2
Figure 11.2 A hierarchical visualization has one single root that separates into one or more branches. It ends with leaf nodes, which in this example are the languages.
Use the hierarchy diagram to trace how one root separates into branches and terminates in language leaf nodes. section 11.0









