An EdgeBundling instance defines if and how the edges of a graph should be bundled by a layout algorithm, 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 IDataProvider can be registered with the input graph with key EDGE_BUNDLE_DESCRIPTOR_DP_KEY to assign descriptors to edges. This allows, for example, to define which edges should actually be bundled.
The following layout algorithms/stages currently support bundling.
- CircularLayout
- RadialLayout
- TreeReductionStage: only for graphs that do not contain multi-parent structures
- EdgeBundlingStage: a generic bundling stage, any core layout algorithm may be used
Default Values of Properties
bundlingQuality | 0.5 | |
bundlingStrength | 0.95 | |
defaultBundleDescriptor | EdgeBundleDescriptor
|
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.EdgeBundling
See Also
Constructors
Creates a new EdgeBundling instance with the given bundling strength and bundling quality.
Parameters
A map of options to pass to the method.
- bundlingStrength - number
- the bundling strength from the interval
[0,1]
- bundlingQuality - number
- the bundling quality from the interval
[0,1]
- defaultBundleDescriptor - EdgeBundleDescriptor
The default EdgeBundleDescriptor used for all edges which do not have a specific descriptor assigned via a IDataProvider registered with key EDGE_BUNDLE_DESCRIPTOR_DP_KEY. This option sets the defaultBundleDescriptor property on the created object.
Throws
- Exception({ name: 'ArgumentError' })
- if the given bundling strength or quality is not within
[0,1]
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 EdgeBundlingStage.
The quality is defined to lie within [0,1]
, where higher values stand for higher quality.
Default Value
0.5
.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
.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 EdgeBundlingStage, 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 descriptor assigned via a IDataProvider registered with key EDGE_BUNDLE_DESCRIPTOR_DP_KEY.
Default Value
EdgeBundleDescriptor.Throws
- Exception({ name: 'ArgumentError' })
- if the given descriptor is
null
See Also
Constants
A data provider key for specifying individual bundling settings for edges.
Remarks
Domain | Edge | |
Values | EdgeBundleDescriptor | a bundle descriptor defining the bundling setup for an edge or null if no specific descriptor is mapped to that edge |