Skip to content

Instantly share code, notes, and snippets.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:41
Scaled branches

Example of scaled branches in TnT Tree.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:41
Sorting nodes

Example of TnT Tree in which the nodes are sorted and colored dynamically.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:39
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.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:38
Different node sizes

Example of TnT Tree with different node sizes.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:37
Node constancy between trees

Example showing node constancy between two TnT Trees when nodes are indexed by internal id or by name.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:36
Layouts example

Example of the vertical and radial layouts in TnT Tree.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:35
Example of labels

Example of different label types in TnT Tree.

@emepyc
emepyc / README.md
Last active August 25, 2017 06:30
Collapsible nodes

Example of TnT Tree. Click on the nodes to collapse / uncollapse them

@emepyc
emepyc / README.md
Last active January 12, 2016 16:34
Simple tree

Example of usage of TnT Tree.

@emepyc
emepyc / README.md
Last active January 12, 2016 16:26
Board resize

Example of board resize in TnT Board.