documentationfor yFiles for HTML 3.0.0.2

RadialGroupLayout

This layout algorithm arranges grouped graphs in a recursive structure.

Inheritance Hierarchy
RadialGroupLayout
Implemented Interfaces

Remarks

Layout Style

RadialGroupLayout is designed to arrange directed and undirected, hierarchically grouped graphs. All members of a group are placed adjacent to the group node along its circular border, resembling the structure of a cactus. The group hierarchy of the graph is represented implicitly by the position of the nodes. Non-hierarchical edges are routed through the centers of all nodes on a path through the hierarchy tree, connecting the edge's endpoints.

Sample radial group drawing of a large graph with default settings

Radial group layout algorithms are commonly used for visualizing relational data and for producing diagrams of high quality that are able to showcase hierarchical properties of the graph. They especially address the concern of recognizability between identical subtrees.

Concept

The algorithm executes the following steps

  1. If no single group acts as a unique root of the hierarchy, create a virtual root containing all nodes to base the layout on.
  2. Recursively determine the size of each node to accommodate the subtrees rooted in its children and place the subtrees relative to it. Prioritize placing large subtrees in centered positions to promote vertical growth.
  3. Adjust the placement of individual subtrees to optimize the usage of space around the subtree roots and improve the compactness of the drawing.
  4. Route the non-hierarchical edges of the graph according to the specified routing policies.
  5. Remove the virtual root of the group, if it was added during the first step of the algorithm.

Features

The algorithm features the possibility to collapse the hierarchy at one or more of its groups, to gather all direct and indirect members of the specified group or groups along their boundary. Collapsed groups can be specified using collapsedSubtreeRoots.

The RadialGroupLayout allows for integrated node labeling. Node labels are placed automatically without generating overlaps with other labels or graph elements. Note that for nodes with multiple labels such overlaps may occur.

The algorithm supports EdgeBundling and all its included features for non-hierarchical edges of the graph.

Defining a preferredRootSectorAngle has a great influence on the layout style. Subtrees at the hierarchy's root get a certain amount of radial space to be placed around the root node, such that a large preferred angle will generally lead to more compact drawings while a smaller angle will focus the drawing towards a singular direction.

The RadialGroupLayout supports customizing the overlap between nodes and their parent nodes. The overlap can be set individually for each node with parentOverlapRatios.

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

Since it is computationally not very complex, RadialGroupLayout is well suited for large graphs. It performs well even for huge graphs.

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:

  • PortPlacementStage: Assigns edges to ports.
  • SubgraphLayoutStage: Filters a graph to include only specific nodes and edges from a subgraph while maintaining the positions of excluded elements. Note: This stage is disabled by default.
  • ComponentLayout: Arranges graph components with customizable styles. Note: This stage is disabled by default.
  • GenericLabeling: Efficiently places node and edge labels. The property fillEmptyScope is set to false and stopDuration is set to ZERO.
  • SelfLoopRouter: Routes self-loops in a graph, allowing for either orthogonal or rounded routing styles.
  • ParallelEdgeRouter: Routes multiple edges between the same nodes in parallel. Note: This stage is disabled by default.

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

Performance

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

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

Should the componentLayout stage be enabled for 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.

Default Values of Properties

edgeLabelPlacementGENERICEdge labels are placed by an independent labeling algorithm.
fromSketchModefalseThe order given by the sketch is ignored.
groupSizePolicyADAPTIVE
nodeLabelPlacementRAY_LIKE_LEAVESNode labels are placed horizontally for inner nodes and ray-like at leaves by this algorithm.
preferredRootSectorAngle360

Type Details

yFiles module
algorithms

See Also

Even though the integrated node labeling is enabled, there may sometimes be overlapping labels if there are nodes with multiple labels.
The layout algorithm considers the nodes as circles and, thus, using a circular node style is strongly recommended to obtain suitable visualizations.

Constructors

Properties

Methods

Constants