Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.TabularLayoutPolicy
See Also
Constants
Layout policy that automatically chooses the table size of the layout.
Remarks
The resulting table gets a dimension such that both row count and column count are similar, leading to a maximally square table with respect to the row and column count (actual node sizes are not considered). For example, given a graph with 14 nodes, a 4x4 grid will be created.
The nodes are arranged in the table in a row-wise fashion using the order provided by nodeComparer. If nodeComparer is null
and considerEdges is enabled, the algorithm applies a heuristic approach that leads to an arrangement of the nodes that has a low overall edge length.
See Also
Layout policy that adopts the size from an already registered PartitionGrid instance.
Remarks
The algorithm generates a tabular layout with the number of rows and columns as specified by the registered grid instance. The settings of the respective RowDescriptors and ColumnDescriptors are considered.
Using this layout policy, it is possible to exactly define in which cell of the table a certain node should be placed by mapping a specific PartitionCellId to a node. PartitionCellId instances can be created using methods createCellId and createCellId. Multi-cells (see e.g. createCellSpanId) are not allowed. The node-cell mapping must be defined in a IDataProvider registered with the graph with key PARTITION_CELL_ID_DP_KEY.
Nodes without a specific mapping to a cell are inserted one after another in a row-wise manner in the order defined by the specified nodeComparer. If nodeComparer is null
and considerEdges is enabled, the algorithm applies a heuristic approach that leads to an arrangement of these nodes that has a low overall edge length.
See Also
Layout policy that uses the coordinates of the input graph to determine the table size and the mapping of the nodes to the cells.
Remarks
Enabling this feature, the current layout of the input graph will be interpreted as a sketch for the layout algorithm. Nodes are assigned to the same row if there exists a horizontal line that crosses through both of their bounding boxes. Similarly, nodes are assigned to the same column if there exists a vertical line that crosses through both of their bounding boxes. Clearly, this strategy only works smoothly if the given input already resembles a rough table arrangement.
If the given layout does not offer any division of the nodes into column and rows or contains overlapping nodes, then the sketch is ambiguous and the algorithm will chose one valid variant.
See Also
Static Methods
Converts the argument to TabularLayoutPolicy.
Parameters
A map of options to pass to the method.
- value - TabularLayoutPolicy
- The value to convert to TabularLayoutPolicy.
Returns
- ↪TabularLayoutPolicy
- Either
value
if it is already a TabularLayoutPolicy or an appropriate converted value.