All examples By author By category About

63anp3ca

Node height

By default, the layout calculates the height of the tree by using the size of the nodes. If nodes have different sizes, the maximum node size is used. All nodes are given the same space (vertical or radial depending on the layout)

In TnT Tree, all the nodes are given the same space (vertical or radial, depending on the layout) and this space is determined by the size of the nodes. If nodes are of different sizes, the maximum node size is used. For a given node, its size is determined by the maximum value between the node display and its label. In the vertical layout, the total height of the tree is given by the sum of the node heights (ie, the number of nodes times the maximum node height).

There are different ways of giving the nodes extra space, for example by giving more height to text labels. This example creates the same effect by giving the node a size different from the one that is used to plot the nodes themselves.

forked from emepyc's block: Node height