This layout algorithm arranges graphs in a radial fashion.
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.
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 layering strategy.
The edges are routed based on the edge routing strategy. Note that the edge routing cannot always prevent node-edge overlaps.
The minimum distance between nodes of the same circle is specified using minimumNodeToNodeDistance. 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 node types 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 of a local root node which are on the same circle can be specified by means of IComparer<T> mapped to the local root node, see OUT_EDGE_COMPARER_DP_KEY. This ordering criterion is stronger than the node types. This feature is especially suitable for tree-like graphs to sort child nodes of a local root node.
Default Values of Properties
centerNodesPolicy | WEIGHTED_CENTRALITY
| The node determined using weighted centrality is placed in the center. |
componentLayoutEnabled | false | The stage that arranges connected graph components is activated. |
considerNodeLabels | false | Node labels are not considered. |
edgeRoutingStrategy | ARC
| The edges will be routed as arcs. |
integratedNodeLabeling | false | Node labels are not placed by this algorithm. |
layeringStrategy | BFS
| The layers are determined using BFS. |
layerSpacing | 25 | |
minimumEdgeToEdgeDistance | 50 | |
minimumLayerDistance | 100 | |
minimumNodeToNodeDistance | 10 | |
nodeLabelingPolicy | RAY_LIKE
| |
orientationLayoutEnabled | true | The orientation |
Type Details
- yfiles module
- layout-radial
- yfiles-umd modules
- layout-radial, layout-hierarchic, layout-tree, layout
- Legacy UMD name
- yfiles.radial.RadialLayout
See Also
Constructors
Creates a new RadialLayout instance with the default settings.
Parameters
A map of options to pass to the method.
- minimumNodeToNodeDistance - number
The minimum distance between two neighboring nodes of the same circle. This option sets the minimumNodeToNodeDistance property on the created object.
- layerSpacing - number
The spacing between two consecutive circles (layers). This option sets the layerSpacing property on the created object.
- minimumLayerDistance - number
The minimum distance between two circles. This option sets the minimumLayerDistance property on the created object.
- maximumChildSectorAngle - number
The maximum sector angle around a node within which the node's children will be placed. This option sets the maximumChildSectorAngle property on the created object.
- minimumBendAngle - number
The minimum bend angle (in degrees) between two adjacent edge segments. This option sets the minimumBendAngle property on the created object.
- centerNodesPolicy - CenterNodesPolicy
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. This option sets the centerNodesPolicy property on the created object.
- centerNodesDpKey - Object
The IDataProvider key used for looking up the selected nodes that should be placed in the center. This option sets the centerNodesDpKey property on the created object.
- layeringStrategy - RadialLayoutLayeringStrategy
The layering strategy that determines how nodes are distributed into different layers. This option sets the layeringStrategy property on the created object.
- edgeRoutingStrategy - RadialLayoutEdgeRoutingStrategy
The edge routing strategy. This option sets the edgeRoutingStrategy property on the created object.
- considerNodeLabels - boolean
Whether or not node labels are taken into account when calculating node positions. This option sets the considerNodeLabels property on the created object.
- orientationLayoutEnabled - boolean
Whether or not the ILayoutStage that modifies the orientation of the layout is activated. This option sets the orientationLayoutEnabled property on the created object.
- minimumSectorDistance - number
The distance between neighboring nodes on the outermost circle that do not share the same predecessor on the previous circle. This option sets the minimumSectorDistance property on the created object.
- createControlPoints - boolean
Whether or not the points of the resulting edge path represent cubic bezier control points. This option sets the createControlPoints property on the created object.
- nodeLabelingPolicy - NodeLabelingPolicy
The policy defining how node labels are placed by the integrated node labeling mechanism (for example, the desired label orientation). This option sets the nodeLabelingPolicy property on the created object.
- integratedNodeLabeling - boolean
Whether or not the layout algorithm automatically places node labels. This option sets the integratedNodeLabeling property on the created object.
- nodeLabelSpacing - number
The distance between node labels belonging to the same node. This option sets the nodeLabelSpacing property on the created object.
- minimumEdgeToEdgeDistance - number
The minimum distance between two neighboring edges of the same circle. This option sets the minimumEdgeToEdgeDistance property on the created object.
- labeling - ILayoutStage
The ILayoutStage that places the labels of the input graph. This option sets the labeling property on the created object.
- selfLoopRouter - ILayoutStage
The ILayoutStage that routes self-loops. This option sets the selfLoopRouter property on the created object.
- parallelEdgeRouter - ILayoutStage
The ILayoutStage that routes parallel edges. This option sets the parallelEdgeRouter property on the created object.
- componentLayout - ILayoutStage
The ILayoutStage that arranges the connected components of an input graph. This option sets the componentLayout property on the created object.
- subgraphLayout - ILayoutStage
The ILayoutStage that constrains the layout process to a subgraph of the input graph. This option sets the subgraphLayout property on the created object.
- hideGroupsStage - ILayoutStage
The ILayoutStage that hides the group nodes of the input graph. This option sets the hideGroupsStage property on the created object.
- orientationLayout - ILayoutStage
The ILayoutStage that modifies the orientation of a computed layout. This option sets the orientationLayout property on the created object.
- layoutOrientation - LayoutOrientation
The main orientation of the layout. This option sets the layoutOrientation property on the created object.
- selfLoopRouterEnabled - boolean
Whether or not the ILayoutStage used for routing self-loops is activated. This option sets the selfLoopRouterEnabled property on the created object.
- labelingEnabled - boolean
Whether or not the ILayoutStage used for placing the labels of the input graph is activated. This option sets the labelingEnabled property on the created object.
- hideGroupsStageEnabled - boolean
Whether or not the ILayoutStage used for hiding group nodes is activated. This option sets the hideGroupsStageEnabled property on the created object.
- componentLayoutEnabled - boolean
Whether or not the ILayoutStage used for arranging the components of the graph is activated. This option sets the componentLayoutEnabled property on the created object.
- parallelEdgeRouterEnabled - boolean
Whether or not the ILayoutStage used for routing parallel edges is activated. This option sets the parallelEdgeRouterEnabled property on the created object.
- subgraphLayoutEnabled - boolean
Whether or not the ILayoutStage used for constraining the layout process to a subgraph of the input graph is activated. This option sets the subgraphLayoutEnabled property on the created object.
Properties
Gets or sets the IDataProvider key used for looking up the selected nodes that should be placed in the center.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
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.
Default Value
WEIGHTED_CENTRALITY.The node determined using weighted centrality is placed in the center.
Throws
- Exception({ name: 'ArgumentError' })
- if an invalid center node policy is given
See Also
Gets or sets the ILayoutStage that arranges the connected components of an input graph.
Default Value
ComponentLayout.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for arranging the components of the graph is activated.
Remarks
Default Value(Overrides the default value defined in MultiStageLayout)
false
.The stage that arranges connected graph components is activated.
See Also
Defined in
Gets or sets whether or not node labels are taken into account when calculating node positions.
Remarks
Default Value
false
.Node labels are not considered.
Sample Graphs
Gets or sets whether or not the points of the resulting edge path represent cubic bezier control points.
Remarks
- 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.
Default Value
false
.Each point is a normal polyline bend point.
Gets the EdgeBundling instance that defines the settings of the edge bundling feature.
Remarks
See Also
Gets or sets the edge routing strategy.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an invalid edge routing strategy is set
See Also
Gets or sets the ILayoutStage that hides the group nodes of the input graph.
Default Value
HideGroupsStage.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for hiding group nodes is activated.
Remarks
Default Value
true
.The stage responsible for hiding group nodes is activated.
See Also
Defined in
Gets or sets whether or not the layout algorithm automatically places node labels.
Remarks
If enabled, this layout algorithm will calculate the positions for the node labels assuring that no overlaps occur.
Different labeling strategies may be selected using nodeLabelingPolicy.
Default Value
false
.Node labels are not placed by this algorithm.
See Also
Sample Graphs
Gets or sets the ILayoutStage that places the labels of the input graph.
Default Value
See Also
Defined in
Gets or sets whether or not the ILayoutStage used for placing the labels of the input graph is activated.
Remarks
Default Value
false
.The stage responsible for label placement is deactivated.
See Also
Defined in
Gets or sets the layering strategy that determines how nodes are distributed into different layers.
Remarks
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an invalid layering strategy is set
See Also
Gets or sets the spacing between two consecutive circles (layers).
Remarks
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.
Default Value
25
.Throws
- Exception({ name: 'ArgumentError' })
- if the spacing value is negative
See Also
Sample Graphs
Gets or sets the main orientation of the layout.
Remarks
Default Value
TOP_TO_BOTTOM.Throws
- Exception({ name: 'ArgumentError' })
- if the specified orientation does not match a default layout orientation
See Also
Defined in
Gets or sets the maximum sector angle around a node within which the node's children will be placed.
Remarks
Default Value
180
.Throws
- Exception({ name: 'ArgumentError' })
- if the sector angle is negative or greater than
360
degrees
Sample Graphs
Gets or sets the minimum bend angle (in degrees) between two adjacent edge segments.
Remarks
0
and 90
degrees.Default Value
5
.Throws
- Exception({ name: 'ArgumentError' })
- if the given minimum bend angle is negative or greater than
90
Sample Graphs
Gets or sets the minimum distance between two neighboring edges of the same circle.
Default Value
50
.Throws
- Exception({ name: 'ArgumentError' })
- if the given minimum distance is negative
Sample Graphs
Gets or sets the minimum distance between two circles.
Default Value
100
.Throws
- Exception({ name: 'ArgumentError' })
- if the minimum layer distance is negative
See Also
Sample Graphs
Gets or sets the minimum distance between two neighboring nodes of the same circle.
Default Value
10
.Throws
- Exception({ name: 'ArgumentError' })
- if the given minimum distance is negative
Sample Graphs
Gets or sets the distance between neighboring nodes on the outermost circle that do not share the same predecessor on the previous circle.
Remarks
Default Value
0
.The nodes are distributed evenly.
See Also
Sample Graphs
Gets or sets the policy defining how node labels are placed by the integrated node labeling mechanism (for example, the desired label orientation).
Default Value
RAY_LIKE.Throws
- Exception({ name: 'ArgumentError' })
- if an unknown labeling policy is given
See Also
Gets or sets the distance between node labels belonging to the same node.
Remarks
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.
Default Value
2.0
.Throws
- Exception({ name: 'ArgumentError' })
- if the given spacing value is negative
See Also
Sample Graphs
0
, node labels will be maximally close to each other and to their node.Gets or sets the ILayoutStage that modifies the orientation of a computed layout.
Default Value
OrientationLayout.See Also
Defined in
Sets whether or not the ILayoutStage that modifies the orientation of the layout is activated.
Default Value
true
.The orientation
See Also
Overrides
Gets or sets the ILayoutStage that routes parallel edges.
Default Value
ParallelEdgeRouter.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for routing parallel edges is activated.
Remarks
Default Value
true
.The stage that routes parallel edges is activated.
See Also
Defined in
Gets or sets the ILayoutStage that routes self-loops.
Default Value
SelfLoopRouter.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for routing self-loops is activated.
Remarks
Default Value
true
.The stage that routes self-loops is activated.
See Also
Defined in
Gets or sets the ILayoutStage that constrains the layout process to a subgraph of the input graph.
Default Value
SubgraphLayout.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for constraining the layout process to a subgraph of the input graph is activated.
Remarks
Default Value
false
.The stage that constrains the input graph to a subgraph is deactivated.
See Also
Defined in
Methods
Appends the given ILayoutStage to the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- the ILayoutStage instance to be added
See Also
Defined in
Calculates a layout for the given graph and applies it directly to the graph.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Calculates a radial arrangement for the given graph.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
Implements
Checks the sizes of the nodes to be non-zero.
Parameters
A map of options to pass to the method.
- g - LayoutGraph
- The graph to check.
Defined in
Deactivates all predefined ILayoutStages so that upon applyLayout only the layout algorithm will be executed.
See Also
Defined in
Prepends the given ILayoutStage to the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- the ILayoutStage instance to be added
See Also
Defined in
Removes the given ILayoutStage from the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- a ILayoutStage to be removed from the layout pipeline
See Also
Defined in
Constants
A data provider key for providing user-defined layer/circle IDs.
Remarks
The IDataProvider registered with this key provides for each node the layer/circle ID to which it belongs. Nodes with the same ID are placed on the same circle while the circles are sorted according to their IDs such that a smaller ID means that the circle has a smaller radius and is closer to the center of the radial layout.
When providing user-defined IDs, the center nodes (nodes on the innermost circle) are not determined by the specified center nodes policy anymore. Instead, the nodes with the smallest given ID (i.e. 0
) define the set of center nodes.
Domain | YNode | |
Values | number | a non-negative integer value representing the layer/circle ID of each node |
See Also
A data acceptor key for publishing the circle ID and sector data.
Remarks
Domain | YNode | |
Values | RadialLayoutNodeInfo | the ID of the circle and sector data to which a node belongs |
See Also
A data provider key for specifying the comparator for the outgoing edges which ultimately orders the successor nodes of a node.
Remarks
Domain | YNode | |
Values | IComparer<T> | the comparator to sort the outgoing edges of the node or null if the order should be determined automatically. |