This diagram does not display Links. Instead the TreeLayout.layerSpacing is set to 0, so that each node and its children have no space between them.

The TreeLayout.treeStyle is set to StyleAlternating, so that alternating layers of the tree grow in each of two directions. Each node's TextBlock is angled according to the direction of the layer of the tree that it is in, and the Shape's size is set according to direction and the position of the node's children.

### GoJS Features in this sample

#### Tree Layout

This predefined layout is used for placing Nodes of a tree-structured graph in layers (rows or columns). For discussion and examples of the most commonly used properties of the TreeLayout, see the Trees page in the Introduction. More information can be found in the GoJS Intro.

Related samples