C

RadialGroupLayout

This layout algorithm arranges grouped graphs in a recursive structure.
ImplementsInheritance Hierarchy

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

NameDefaultDescription
edgeLabelPlacementRadialEdgeLabelPlacement.GENERIC
Edge labels are placed by an independent labeling algorithm.
fromSketchModefalse
The order given by the sketch is ignored.
groupSizePolicyGroupSizePolicy.ADAPTIVE
nodeLabelPlacementRadialNodeLabelPlacement.RAY_LIKE_LEAVES
Node labels are placed horizontally for inner nodes and ray-like at leaves by this algorithm.
preferredRootSectorAngle360

See Also

Developer's Guide

Members

Show:

Constructors

Creates a new RadialGroupLayout instance with default settings.

Parameters

Properties

Gets the ComponentLayout from the layoutStages of this instance.

By default, the algorithm handles components by itself and, thus, the ComponentLayout is not enabled.

If you need to replace the instance, modify the layoutStages stack using replace. If you want to remove a stage, consider disabling it instead.

readonlyfinal

Throws

Exception ({ name: 'InvalidOperationError' })
If there is no instance of the respective type in the layoutStages
Gets the EdgeBundling instance that defines the settings of the edge bundling feature.
The specified EdgeBundling defines global bundling properties. Settings for individual edges can be defined by assigning an EdgeBundleDescriptor to an edge with edgeBundleDescriptors.
To enable bundling for all edges, set a defaultBundleDescriptor which has bundling enabled.
readonlyfinal

Property Value

the EdgeBundling instance defining the edge bundling setup

See Also

Developer's Guide
Gets or sets how the layout handles the position of edge labels.
conversionfinal

Property Value

IGNORE if the edge labels are ignored by the layout algorithm, and GENERIC if the edge labels are placed by the GenericLabeling algorithm subsequently.

Default Value

The default value is: RadialEdgeLabelPlacement.GENERIC
Edge labels are placed by an independent labeling algorithm.
Gets or sets whether the order of subtrees around a root may be changed by the algorithm.
final

Property Value

true if subtree order is fixed, false otherwise.

Default Value

The default value is: false
The order given by the sketch is ignored.

See Also

Developer's Guide
Gets or sets the policy defining how group node sizes are determined.
conversionfinal

Property Value

One of the predefined group sizing policies

Default Value

The default value is: GroupSizePolicy.ADAPTIVE

See Also

Developer's Guide
Gets or sets how the layout algorithm handles node labels.
Optimal label placement with integrated labeling can be achieved using a label model which allows free placement of node labels.
conversionfinal

Property Value

  • IGNORE if node label positions relative to their owner should be maintained and ignored during the layout process.
  • CONSIDER if node label positions relative to their owner should be maintained and considered for the placement of other graph elements to avoid overlaps.
  • HORIZONTAL if horizontal node label positions should be calculated by this layout algorithm, assuring that no overlaps occur.
  • RAY_LIKE if ray-like node label positions should be calculated by this layout algorithm, assuring that no overlaps occur.
  • RAY_LIKE_LEAVES if a mix of horizontal and ray-like node label positions should be calculated by this layout algorithm, assuring that no overlaps occur.
  • GENERIC if the node labels should be placed by the GenericLabeling algorithm subsequently.

Default Value

Node labels are placed horizontally for inner nodes and ray-like at leaves by this algorithm.

Sample Graphs

ShownSetting: IGNORE

See Also

Developer's Guide
API
RadialNodeLabelPlacement
Gets or sets the spacing used for node labels when integrated node labeling is enabled.

For ray-like label placement of leaf nodes, the spacing defines the distance between labels and the node they belong to (e.g. for ray-like label placement). For labels of inner nodes, the spacing specifies the distance between the labels (if there are multiple labels).

The spacing must have a non-negative value.

The spacing value has an effect only if nodeLabelPlacement is set to one of HORIZONTAL, RAY_LIKE or RAY_LIKE_LEAVES.
final

Property Value

the non-negative node label spacing

Throws

Exception ({ name: 'ArgumentError' })
if the given spacing value is negative

Default Value

The default value is: 4.0

Sample Graphs

ShownSetting: Node label spacing set to 2.0

See Also

API
nodeLabelPlacement
Gets or sets the maximum angle in degrees on which the root's children can be distributed around its center.
final

Property Value

the angle on which the root's children are distributed.

Throws

Exception ({ name: 'ArgumentError' })
if a negative angle, or an angle of more than 360 degrees is specified.

Default Value

The default value is: 360

Sample Graphs

ShownSetting: 360 degrees

See Also

Developer's Guide

Methods

Arranges the given grouped graph in the style of a radial group layout.
The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph. This method is not side effect-free in the sense that the order of edges or nodes in the input graph may change during the layout process.

Parameters

graph: LayoutGraph
the grouped input graph
Arranges the given grouped graph in the style of a radial group layout.
The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph. This method is not side effect-free in the sense that the order of edges or nodes in the input graph may change during the layout process.
protectedfinal

Parameters

graph: LayoutGraph
the grouped input graph
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the RadialGroupLayout.
The generic type arguments of the created layout data are compatible with instances of LayoutGraph, but the layout data is not bound to a specific graph instance. Therefore, the created layout data still has to be passed as an argument of applyLayout in order to be applied.

Parameters

graph: LayoutGraph
the graph that determines the generic type arguments of the created layout data

Return Value

RadialGroupLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
an instance of layout data that can be used to perform item-specific configurations for the given RadialGroupLayout.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the RadialGroupLayout.
The generic type arguments of the created layout data are compatible with instances of IGraph, but the layout data is not bound to a specific graph instance. Therefore, the created layout data still has to be passed as an argument of applyLayout in order to be applied.
This method is not available unless the module view-layout-bridge is loaded. Either load the module 'view-layout-bridge' explicitly or ensure that the LayoutExecutor type is available at runtime.

Parameters

graph?: IGraph
the graph that determines the generic type arguments of the created layout data

Return Value

RadialGroupLayoutData<INode, IEdge, ILabel, ILabel>
an instance of layout data that can be used to perform item-specific configurations for the given RadialGroupLayout.

Constants

All constants are filtered. Go to Filters.