C

RadialLayout

This layout algorithm arranges graphs in a radial fashion.
ImplementsInheritance Hierarchy

Remarks

Layout Style

The nodes are distributed into circles (layers) around a common center based on predefined layering strategies. Some potential applications include visualization of social networks, data clustering and bioinformatics.

Sample output of the layout algorithm with default settings and one center node.

Sample output of the layout algorithm with straight-line edges and five custom center nodes using centerNodes.

Sample output of the layout algorithm for a tree with dendrogram layering, radial polyline edge routing and maximum child sector angle 360.

Concept

The layout algorithm creates a virtual tree structure for the input graph whose root node is placed in the center of the circles. All children of a tree node are placed on a higher layer (i.e. on a circle of larger radius) than their parent. A sector is calculated for each node such that the sector of each child node in the virtual tree is a sub-sector of its parent's sector. The radii of the circles are calculated based on the sizes of the sectors required to accommodate each whole subtree.

Features

There are different center nodes policies that can be applied in order to determine the nodes that will be placed in the center (single center node) or on the innermost circle (more than one center node). The distribution of the nodes to the circles is specified by a layeringStrategy.

The edges are routed based on the edgeRoutingStyle. Note that the edge routing cannot always prevent node-edge overlaps.

The minimum distance between nodes of the same circle is specified using minimumNodeDistance. If there are too many nodes assigned to a circle, the radius of the particular circle will be increased until all nodes fit onto it.

The distance between consecutive layers is specified using layerSpacing. The radii of the circles are a multiple of this spacing value. If the layer spacing is 0, the radii are chosen such that all nodes fit on their corresponding circles. A minimum layer distance is specified by minimumLayerDistance.

The RadialLayout also supports nodeTypes as a subordinate criterion for nodes of the same circle. More precisely, for nodes of the same circle (i.e., within the same layer), the algorithm prefers to place nodes of the same type next to each other if this does not induce additional crossings or conflicts with other constraints. Note that the algorithm uses an additional local optimization heuristic to improve the placement with respect to node types and, thus, does not guarantee optimal results. Furthermore, this additional step may increase the required runtime. The layer assignment is not affected by the node types.

The ordering of successor nodes can be specified by means of a mapper, see childOrder. This ordering criterion is stronger than the node types. This feature is especially suitable for tree-like graphs to sort child nodes.

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 RadialLayout algorithm is a fast algorithm that is generally well-suited to handle even large graphs.

With disconnected graphs containing 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

NameDefaultDescription
centerNodesPolicyCenterNodesPolicy.WEIGHTED_CENTRALITY
The node determined using weighted centrality is placed in the center.
edgeLabelPlacementRadialEdgeLabelPlacement.IGNORE
Edge labels are placed by an independent labeling algorithm.
edgeRoutingStyleRadialLayoutRoutingStyle.ARC
The edges will be routed as arcs.
layeringStrategyRadialLayeringStrategy.BFS
The layers are determined using BFS.
layerSpacing25
minimumEdgeDistance50
minimumLayerDistance100
minimumNodeDistance10
nodeLabelPlacementRadialNodeLabelPlacement.CONSIDER
Node labels are considered.

See Also

Developer's Guide

Members

Show:

Constructors

Creates a new RadialLayout instance with the default settings.

Parameters

Properties

Gets or sets the policy that determines which nodes are selected as roots of the (virtual) tree for the layout process and are set in the center of the circles.
If the predefined policies for determining the center nodes are not suitable for your specific use case, you can use centerNodes to define your own center nodes. In this case the centerNodesPolicy will be ignored.
This policy is ignored if the layers (i.e. circles) are specified manually by using layerIds. Instead, the nodes with the smallest provided layer/circle ID determine the center nodes.
conversionfinal

Property Value

one of the predefined center node policies

Default Value

The node determined using weighted centrality is placed in the center.

See Also

Developer's Guide
Gets the ComponentLayout from the layoutStages of this instance.
If you need to replace the instance, modify the layoutStages stack using replace.
readonlyfinal

Throws

Exception ({ name: 'InvalidOperationError' })
If there is no instance of the respective type in the layoutStages
Gets or sets whether or not the points of the resulting edge path represent cubic bezier control points.
  • Disabled (default): Each point of the path represents a normal polyline bend point.
  • Enabled: Four consecutive points p1, p2, p3, p4 of the resulting edge path need to be interpreted such that p1 is the start point of the cubic bezier curve, p4 is the end point of it and p2, p3 are the two intermediate control points. If p4 is not the last point of the edge path it is at the same time the start point of the next curve. For example, points p1, p2, p3, p4, p5, p6, p7 form a path that consists of two curves: the curve defined by p1, p2, p3, p4 and the curve defined by p4, p5, p6, p7.
This feature is useful when the visualization of the edge draws bezier curves instead of polyline paths.
final

Property Value

true if the bends are interpreted as cubic bezier control points, false otherwise

Default Value

The default value is: false
Each point is a normal polyline bend point.
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.
Edge bundling may be of low quality if the virtual tree is not drawn planar, i.e., there exist tree-edges that cross each other. This is more likely to occur if HIERARCHICAL layering strategy is selected.
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 an independent labeling algorithm. The used generic labeling algorithm can be accessed for further configuration on the layoutStages, using get.

Default Value

The default value is: RadialEdgeLabelPlacement.IGNORE
Edge labels are placed by an independent labeling algorithm.
Gets or sets the edge routing style.
The edge routing cannot always prevent node-edge overlaps.
conversionfinal

Property Value

The edge routing style

Default Value

The default value is: RadialLayoutRoutingStyle.ARC
The edges will be routed as arcs.

See Also

Developer's Guide
Gets or sets the layering strategy that determines how nodes are distributed into different layers.

All nodes of a given layer will be placed on the same circle.

If the predefined strategies for assigning layers or circles are not suitable for your specific use case, you can use layerIds to define your own strategy. In this case the layeringStrategy will be ignored.

conversionfinal

Property Value

one of the predefined layering strategies

Default Value

The default value is: RadialLayeringStrategy.BFS
The layers are determined using BFS.

See Also

Developer's Guide
Gets or sets the spacing between two consecutive circles (layers).

The spacing is a non-negative value, where 0 means that no spacing is considered.

The radius of each circle will be a multiple of this value.

final

Property Value

the spacing value

Throws

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

Default Value

The default value is: 25

Sample Graphs

ShownSetting: Layer spacing 25

See Also

Developer's Guide
Gets or sets the maximum angle in degrees of the sector around a node within which the node's children will be placed.
Based on the location of a given node, the sector of its children that lie on the next outer layer is described by this angle. The vertex of the angle is located in the center of the node while its sides point away from the inner circles. The child nodes are placed inside this angle. If there is not enough space, the radius of the child circle is increased.
final

Property Value

the maximum sector angle in degrees from the interval [0,360]

Throws

Exception ({ name: 'ArgumentError' })
if the sector angle is negative or greater than 360 degrees

Default Value

The default value is: 180

Sample Graphs

ShownSetting: Maximum sector angle 90
Gets or sets the minimum bend angle (in degrees) between two adjacent edge segments.
The minimum bend angle is defined to be a value between 0 and 90 degrees.
Increasing this value reduces the number of bends such that the edge path becomes less smooth.
This setting has an influence only if ARC is selected as routing style.
final

Property Value

an angle from the interval [0,90]

Throws

Exception ({ name: 'ArgumentError' })
if the given minimum bend angle is negative or greater than 90

Default Value

The default value is: 5

Sample Graphs

ShownSetting: Minimum bend angle 1
Gets or sets the minimum distance between two neighboring edges of the same circle.
final

Property Value

a non-negative distance

Throws

Exception ({ name: 'ArgumentError' })
if the given minimum distance is negative

Default Value

The default value is: 50

Sample Graphs

ShownSetting: Edge to edge distance 50 (default)
Gets or sets the minimum distance between two circles.
final

Property Value

the non-negative distance between two circles

Throws

Exception ({ name: 'ArgumentError' })
if the minimum layer distance is negative

Default Value

The default value is: 100

Sample Graphs

ShownSetting: Minimum layer distance 100

See Also

Developer's Guide
Gets or sets the minimum distance between two neighboring nodes of the same circle.
final

Property Value

a non-negative distance

Throws

Exception ({ name: 'ArgumentError' })
if the given minimum distance is negative

Default Value

The default value is: 10

Sample Graphs

ShownSetting: Node distance 10
Gets or sets the distance between neighboring nodes on the outermost circle that do not share the same predecessor on the previous circle.
This distance is added to the minimum distance between nodes.
This option only has an effect if layeringStrategy is set to DENDROGRAM.
final

Property Value

The distance between nodes neighboring nodes on the outermost circle.

Default Value

The default value is: 0
The nodes are distributed evenly.

Sample Graphs

ShownSetting: Sector distance 10

See Also

API
minimumNodeDistance, layeringStrategy, DENDROGRAM
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 an independent labeling algorithm. The used generic labeling algorithm can be accessed for further configuration on the layoutStages, using get.

Default Value

The default value is: RadialNodeLabelPlacement.CONSIDER
Node labels are considered.

Sample Graphs

ShownSetting: IGNORE

See Also

Developer's Guide
API
RadialNodeLabelPlacement
Gets or sets the distance between node labels belonging to the same node.

It also defines the distance between labels and the node they belong to in case of label placement outside of the node (e.g. for ray-like label placement).

The spacing must have a non-negative value.

With a spacing of 0, node labels will be maximally close to each other and to their node.
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: 2.0

Sample Graphs

ShownSetting: Default node label spacing of 4.0

See Also

API
nodeLabelPlacement
Gets the ParallelEdgeRouter from the layoutStages of this instance.
If you need to replace the instance, modify the layoutStages stack using replace.
readonlyfinal

Throws

Exception ({ name: 'InvalidOperationError' })
If there is no instance of the respective type in the layoutStages
Gets the SelfLoopRouter from the layoutStages of this instance.
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 TreeReductionStage from the layoutStages of this instance.
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

Methods

Calculates a radial arrangement for the given graph.

Parameters

graph: LayoutGraph
the input graph
Calculates a radial arrangement for the given graph.
protectedfinal

Parameters

graph: LayoutGraph
the input graph
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the RadialLayout.
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

RadialLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
an instance of layout data that can be used to perform item-specific configurations for the given RadialLayout.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the RadialLayout.
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

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

See Also

Developer's Guide

Constants

All constants are filtered. Go to Filters.