documentationfor yFiles for HTML 2.6

GridNodePlacer

The GridNodePlacer arranges the shapes of the children of a local root in a grid.

Inheritance Hierarchy
Implemented Interfaces

Remarks

Layout Style

The grid consists of a number of rows. The subtrees are assigned to the rows using a IDataProvider that is registered with the graph with ROW_INDEX_DP_KEY. If there is no row mapping provided, all subtrees are assigned to a single row. Furthermore, if property automaticRowAssignment is enabled, the row assignment is made automatically - the produced grid will be square-like with respect to the child count, ignoring actual subtree sizes. For example, if there are nine children, a grid with three rows is generated.

The edges from the children to the local root are routed in a bus-like way. The placement of the bus can be configured using the property busPlacement. The alignment of the root node can be configured using rootAlignment. To align the root node with the bus, use BUS_ALIGNED. A bus-aligned root in conjunction with CENTER produces a symmetric grid with the bus and root aligned in the middle.

Child nodes in a grid with three rows, with a bus-aligned root and the bus placed in the center

Child nodes placed in a grid using three rows and four columns where the root alignment and bus placement are leading.

Default Values of Properties

automaticRowAssignmentfalseThe rows are user-specified.
busPlacementLEADINGThe bus is placed leading, left of the grid structure.
rootAlignmentBUS_ALIGNED
spacing20

Type Details

yfiles module
layout-tree
yfiles-umd modules
layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
Legacy UMD name
yfiles.tree.GridNodePlacer

See Also

Constructors

Properties

Methods

Fields

Constants