C

EdgeBundling

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.
Inheritance Hierarchy

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.

Example of edge bundling with CircularLayout Example of edge bundling when applying TreeReductionStage and RadialTreeLayout on a general graph

This class cannot be instantiated

Default Values of Properties

NameDefault
bundlingQuality0.5
bundlingStrength0.95
defaultBundleDescriptorEdgeBundleDescriptor

See Also

Developer's Guide

API

EdgeBundleDescriptor, edgeBundling, edgeBundling, edgeBundling, edgeBundling

Members

Show:

Properties

Gets or sets the desired quality of the calculated edge bundling.

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.

This feature has an effect if the applied layout algorithm is the CircularLayout or the BundledEdgeRouter.
final

Property Value

a value between 0 (low quality, fast) and 1 (high quality, slow)

Throws

Exception ({ name: 'ArgumentError' })
if the given quality value is not within [0,1]

Default Value

The default value is: 0.5

See Also

Developer's Guide
Gets or sets the strength of the edge bundling.

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].

For all other algorithms except from the BundledEdgeRouter, to obtain results with clearly observable larger bundles, it is recommended to use a strength value of 0.8 or higher. For the BundledEdgeRouter, it is recommended to use a value, close to 0.4.
A bundling strength of 0 leads to straight-line edges where edges are basically not bundled.
For the BundledEdgeRouter, high values can significantly affect the performance of the algorithm, especially for large graphs.
final

Property Value

the bundling strength between 0 (no bundling) and 1 (strongly bundled edges).

Throws

Exception ({ name: 'ArgumentError' })
if the given strength is less than 0 or greater than 1

Default Value

The default value is: 0.95

Sample Graphs

ShownSetting: 0.95 (using CircularLayout)

See Also

Developer's Guide
Gets or sets the default EdgeBundleDescriptor used for all edges which do not have a specific, individual descriptor assigned via layout data properties.
Individual descriptors can be assigned to edges using the property on the appropriate layout data instance, depending on the applied layout algorithm:
final

Property Value

the default descriptor responsible for edges with no specific descriptor

Throws

Exception ({ name: 'ArgumentError' })
if the given descriptor is null

Default Value

The default value is: EdgeBundleDescriptor

See Also

Developer's Guide

Constants

All constants are filtered. Go to Filters.