An EdgeBundling instance defines if and how the edges of a graph should be bundled by an ILayoutAlgorithm, given that the algorithm supports edge bundling.
Remarks
Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. At the source and target point, the edges are again clearly split. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes. Without bundling, such drawings can often contain visual clutter and feature bad readability.
The bundling strength and quality are global settings for the bundling process. On the other hand, each edge can get specific settings by assigning a EdgeBundleDescriptor to it. A IMapper<K,V> can be registered with the input graph with key EDGE_BUNDLE_DESCRIPTOR_DATA_KEY to assign descriptors to edges. This allows, for example, to define which edges should actually be bundled. For most layout algorithms, there is a corresponding LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> that simplifies the process of assigning EdgeBundleDescriptors.
The following layout algorithms/stages currently support bundling.
- CircularLayout
- RadialLayout
- TreeReductionStage: only for graphs that do not contain multi-parent structures
- BundledEdgeRouter: a generic bundling router, any core layout algorithm may be used
This class cannot be instantiated
Default Values of Properties
bundlingQuality | 0.5 | |
bundlingStrength | 0.95 | |
defaultBundleDescriptor | EdgeBundleDescriptor
|
Type Details
- yFiles module
- algorithms
See Also
Properties
Gets or sets the desired quality of the calculated edge bundling.
Remarks
Higher quality indicates that the bundling procedure uses more sophisticated methods to compute the actual bundles and the routing of the edges. If the applied layout algorithm is the CircularLayout, this may lead to a significantly higher running time, especially for large graphs. On the other hand, a low quality indicates that run-time is more important than highly optimized bundling results, leading to, for example, more crossings between different bundles (for CircularLayout) or completely straight-line un-bundled edges for the BundledEdgeRouter.
The quality is defined to lie within [0,1]
, where higher values stand for higher quality.
Default Value
0.5
.Property Value
0
(low quality, fast) and 1
(high quality, slow)Throws
- Exception({ name: 'ArgumentError' })
- if the given quality value is not within
[0,1]
See Also
Gets or sets the strength of the edge bundling.
Remarks
The strength controls how tightly the edges are bundled and influences the shape of the curves of bundled edges. Low values lead to only slightly bundled edges; results will mostly show individual node-to-node connectivity information. High values show the connectivity on a higher level, strongly bundling edges together and generating highly curved edge paths.
The bundling strength is defined as a value from the interval [0,1]
.
Default Value
0.95
.Property Value
0
(no bundling) and 1
(strongly bundled edges).Throws
- Exception({ name: 'ArgumentError' })
- if the given strength is less than
0
or greater than1
See Also
Sample Graphs
0.8
or higher. For the BundledEdgeRouter, it is recommended to use a value, close to 0.4
.0
leads to straight-line edges where edges are basically not bundled.Gets or sets the default EdgeBundleDescriptor used for all edges which do not have a specific, individual descriptor assigned via layout data properties.
Remarks
Default Value
EdgeBundleDescriptor.Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given descriptor is
null
See Also
Constants
A data key for specifying individual bundling settings for edges.