documentationfor yFiles for HTML 2.6

CompactOrthogonalLayout

This layout algorithm arranges a graph in a compact, orthogonal fashion.

Inheritance Hierarchy
LayoutStageBase
PartitionLayout
CompactOrthogonalLayout
Implemented Interfaces

Remarks

Layout Style

This layout algorithm is a variant of OrthogonalLayout that tries to arrange nodes in a more compact way. It allows to specify a desired aspect ratio for the bounds of the calculated layout. Nodes of a given graph are arranged such that each edge is drawn as an alternating sequence of horizontal and vertical segments.

CompactOrthogonalLayout is well suited for small and medium-sized sparse graphs and produces compact drawings with no overlapping nodes, few crossings and few bends. It is also especially suitable for printing the diagram on a paper of predefined size. As a disadvantage, this algorithm will usually produce less elegant edge routes than the ones of OrthogonalLayout.

Application domains of orthogonal drawings are software engineering, project management, function call graphs and object-oriented class diagrams.

Sample output of the layout algorithm with aspect ratio 1.0

Concept

This algorithm is implemented as a PartitionLayout and applies the following steps:

Each of these steps can be individually configured and/or replaced. To do so, use methods partitionFinder, coreLayout, partitionPlacer and interEdgeRouter, respectively.

Features

The aspect ratio of the resulting layout bounds, i.e., the ratio of width/height of the layout, can be configured using aspectRatio. CompactOrthogonalLayout tries to reach this preferred value. However, depending on the actual graph structure, this may not always be possible.

Octilinear routing of edges can be supported by appending PolylineLayoutStage.

Default Values of Properties

aspectRatio1
coreLayoutOrthogonalLayout
gridSpacing20
interEdgeRoutercreateChannelInterEdgeRouter
partitionFindercreateEdgeBetweennessPartitionFinder
partitionPlacercreateComponentPartitionPlacer

Type Details

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

See Also

Constructors

Properties

Methods