Layout generators
Once you have a standard hierarchy, you can use it co create a hierarchical visualization. There are many ways to display a hierarchy, and depending on the one you choose, you will need to perform additional computations to distribute shapes in your browser's viewport so that it renders an accurate visual representation. This involves calculating margins, applying scales and computing positions for each symbol that is bound to hierarchical data. Most of this work is done by a layout generator that takes a hierarchical dataset and computes properties for each node based on viewport parameters, such as height, width and margins.
The following table contains the five layout generator functions from the d3-hierarchy module that ...
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