documentationfor yFiles for HTML 3.0.0.2

CircularLayout

This layout algorithm arranges graphs in a circular fashion.

Inheritance Hierarchy
CircularLayout
Implemented Interfaces

Remarks

Layout Style

The nodes are arranged in circles and stars which emphasize group and tree structures inside a graph. Circular layout algorithms find applications in many areas such as social networking, network management, WWW visualization, eCommerce, telecommunications.

Circular layout with default settings

Circular layout with SINGLE_CYCLE partitioning policy

Circular layout with SINGLE_CYCLE partitioning policy and exterior edge routing

Concept

The layout algorithm performs three steps when calculating a circular arrangement for a graph:

  1. It searches for partitions in the input graph depending on connectivity and on the given partitioningPolicy. Considering each partition as a node, the resulting graph has a tree-like structure.
  2. The partitions are laid out as circles using the selected style.
  3. The algorithm delegates the layout calculation for the underlying tree (in which each node corresponds to a partition) to a specialized layout algorithm accessible by backboneLayout. The partitions are moved to their final location.

Features

The layout algorithm places the nodes in circles that represent a partition. There are several ways to find partitions in the input graph. Which one is applied is defined using partitioningPolicy.

The nodes in a partition can either lie on or in the interior of a circle. The placement of the nodes affects the compactness of the layout and can be specified using partitionDescriptor.

Since edges are routed as straight lines, they may overlap with nodes or node labels. To resolve these overlaps, an edge routing algorithm (e.g. EdgeRouter or OrganicEdgeRouter) can be appended.

Edges that belong to the same circle partition can be routed around the exterior of the circle. The edgeRoutingPolicy determines which edges are exterior and routing details of these edges can be configured via exteriorEdgeDescriptor. Exterior edge routes consist of smooth arcs. Edges that are routed externally can significantly improve the readability of the circular layout by reducing the edge clutter in the interior of the circle. This holds true especially for graph with a large number of edges. On the other hand, it significantly increases the amount of required space and, thus, is not recommended when maximally compact layouts are desired.

This layout algorithm supports edgeBundling. In order to bundle the edges, the nodes of the graph are clustered in groups. Edge bundling is supported only if the partition style is set to CYCLE and partitioningPolicy is other than BCC_ISOLATED.

This layout algorithm handles port placement constraints by applying the PortPlacementStage as a postprocessing step.

Layout Stages

This class provides a configurable pipeline that contains various ILayoutStages. Each ILayoutStage can incorporate preprocessing or postprocessing steps into the layout calculation to streamline the input graph and enhance the resulting layout. Additionally, custom ILayoutStages can be added and executed either before or after the predefined ones.

The following default ILayoutStages are included:

With these layoutStages the layout algorithm is configured well, so they usually don't need to be changed.

Performance

The CircularLayout algorithm is a fast algorithm that is generally well-suited to handle even large graphs.

With disconnected graphs that contain large unconnected components, it can be beneficial to change the component arrangement style of the used componentLayout from the default style PACKED_CIRCLE to the faster ROWS style.

With graphs containing a large number of edges, applying edgeBundling can cause the algorithm to take noticeably longer to arrive at a result.

Default Values of Properties

edgeLabelPlacementGENERICEdge labels are placed by an independent labeling algorithm.
edgeRoutingPolicyINTERIOREdges are routed as simple straight lines on the interior.
fromSketchModefalseThe layout algorithm does not consider the initial coordinates of the nodes.
maximumDeviationAngle90
nodeLabelPlacementCONSIDERNode labels are considered.
partitioningPolicyBCC_COMPACT
placeChildrenOnCommonRadiustrueChildren are placed on a common radius.

Type Details

yFiles module
algorithms

See Also

If the partitioningPolicy is set to BCC_ISOLATED or if custom partitions are specified, the underlying graph that connects the partition is usually not a perfect tree structure, i.e., it may contain additional non-tree edges. Since the applied backboneLayout only considers tree edges, the non-tree edges may sometimes overlap with other graph elements.

Constructors

Properties

Methods

Constants