Layout Features Tutorial
Tree Layout with Node Placers
This demo shows how to use
node placers
with the
Tree Layout
. A node placer is responsible for the arrangement of a local root node and all of its
subtrees.
yFiles comes with predefined node placers that provide a variety of subtree arrangement
schemes. This example uses three of them:
-
Node 1 uses a
LayeredNodePlacer
, that places child nodes with the same depth in the tree in the same horizontal layer.
-
Node 2 uses a
LeftRightNodePlacer
, that places child nodes left and right of of a single vertical bus.
-
Node 6 uses a
DoubleLineNodePlacer
, that places child nodes in two horizontal lines.
Code Snippet
You can copy the code snippet to configure the layout from
GitHub
.
Demos
See the
Tree Layout Demo
for mode extensive examples of node placers.
Documentation
See the
Tree Layout
section in the Developer's Guide for an in-depth discussion of the relevant concepts.