documentationfor yFiles for HTML 2.6

TabularLayout

This layout algorithm places nodes in a tabular fashion.

Inheritance Hierarchy
TabularLayout
Implemented Interfaces

Remarks

Layout Style

The nodes are placed based on an underlying PartitionGrid structure. Only nodes are arranged, edges are not routed, but their bend points are cleared. Therefore, this algorithm is suitable if nodes should be arranged in rows and columns in a regular fashion.

A tabular layout of 8 nodes organized in a 3x3 grid

A tabular layout of 8 nodes organized in a 2x6 grid with some gaps (empty cells)

Concept

The table consists of cells which form rows and columns. Each cell contains a single node or might also be empty. Note that it is not required that the input graph already contains a PartitionGrid for this algorithm to properly work. It is, however, useful if the resulting row and column geometry should be retrieved (e.g. to visualize the table). It is mandatory to register a PartitionGrid when using layout policy FIXED_SIZE.

Rows/columns do not overlap and are not compacted: nodes that belong to different rows are strictly separated with respect to the covered y-coordinates range and nodes that belong to different columns are strictly separated with respect to the covered x-coordinate range.

Features

It is possible to define in which cell of the table a certain node should be placed when using policy FIXED_SIZE. See the policy documentation for more details.

The algorithm considers the following properties associated with RowDescriptors and ColumnDescriptors of a PartitionGrid registered with the input graph:

Group nodes are supported but only top-level groups are handled like an actual node in the table. The content of top-level groups is kept fix. That means that the content keeps the relative location with respect to the top-level group but it is not recursively arranged in a tabular fashion. To achieve recursive layouts where the content is a tabular layout too, use RecursiveGroupLayout with TabularLayout as core layout algorithm. Generally, it is recommended that group nodes already have proper bounds enclosing all content (and their labels). Otherwise, overlaps may occur, as group node sizes are not changed by this algorithm. RecursiveGroupLayout with NULL_LAYOUT as core algorithm can be used to recursively assign group node sizes.

Default Values of Properties

considerEdgesfalseEdges are not considered.
considerNodeLabelstrueNode labels are considered.
defaultNodeLayoutDescriptorTabularLayoutNodeLayoutDescriptorDescriptor instance with default settings.
layoutPolicyAUTO_SIZE
maximumDuration<code>0x7FFFFFFF</code>The layout algorithm runs unrestricted.
nodeComparernullThe nodes are sorted with respect to their indices of the graph structure.

Type Details

yfiles module
layout-core
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.layout.TabularLayout

See Also

The minimum distance between nodes can either be influenced by specifying suitable column/row insets as described above or by specifying NodeHalos.
The settings optimizeRowOrder and optimizeColumnOrder of a given grid instance are not considered by this layout algorithm. Furthermore, the following properties of rows and columns are ignored as well: tightness, indexFixed, tightness and indexFixed.

Constructors

Properties

Methods

Constants