documentationfor yFiles for HTML 2.6

OrganicEdgeRouter

This edge routing algorithm applies organic routes to the edges of the graph.

Inheritance Hierarchy
OrganicEdgeRouter
Implemented Interfaces

Remarks

Layout Style

Edges are routed organically, i.e. in smooth curves around the nodes observing a minimum distance to the nodes.

During the routing process, the positions of the nodes are considered to be fixed and the router will not modify their locations or their sizes in any way.

The edge routing algorithm can be applied whenever edge paths should avoid crossing any nodes in organic or cyclic layout styles.

Concept

The edge routing algorithm uses a force-directed approach to calculate the edge paths. Nodes are considered to be repulsive forces while edges will try to become as short as possible.

Each edge is routed separately and is influenced by the nodes in a certain area around it. The algorithm will add bends to the edge path that are placed by balancing the forces.

The quality of the result highly depends on how much space there is between the nodes. More precisely, the distance between each pair of nodes should be at least twice the specified minimum distance. If it is not necessary that the nodes keep their locations, this can be ensured using a combination of RemoveOverlapsStage and node enlargement stage.

Features

minimumDistance will make edges keep a custom distance to the nodes. However, if there is not enough space between the nodes, this distance may be undershot (i.e. edges will be closer to nodes).

OrganicEdgeRouter is able to reuse existing bends. Edges will contain those bends along with other bends added by the layout algorithm. Another feature allows to consider bends such that they influence the route finding, however, their absolute location is not kept (see considerExistingBends).

This edge routing algorithm is realized as a ILayoutStage which can be applied to a graph directly or using a core layout algorithm.

Default Values of Properties

considerExistingBendsfalseBends in the input graph are not considered for edge routing.
edgeNodeOverlapAllowedtrueEdges are allowed to cross nodes.
keepExistingBendsfalseBends coordinates in the input graph are not kept fix.
minimumDistance10
routeAllEdgesfalseOnly edges being too close to nodes are rerouted.

Type Details

yfiles module
router-other
yfiles-umd modules
layout-familytree, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-other
Legacy UMD name
yfiles.router.OrganicEdgeRouter

See Also

Constructors

Properties

Methods

Constants