Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 126.96.36.199
Edges can be routed orthogonally, i.e. only horizontal and vertical segments, or with additional segments with other slopes.
Fig. 1: The same graph with orthogonal (left) and polylinear (right) edge routing.
Polyline routing can be activated using PolylineRouting .
In both routing styles, edges can be grouped so they share common segments in the beginning or end of their routes.
Fig. 2: Same graph as in Fig. 1 with grouped edges.
Many settings of the edge layout can be controlled individually for every edge using EdgeLayoutDescriptor instances. So, if at the time of the invocation a IDataProvider instance is bound to the graph using the EdgeLayoutDescriptorDpKey key, the EdgeLayoutDescriptors provided for the individual edges are used. Whenever no descriptor is provided for an edge, a default edge layout descriptor is used as fall-back value. This edge layout descriptor can be obtained with DefaultEdgeLayoutDescriptor .
coordinates all settings and steps that are needed to achieve a
polylinear or orthogonal edge routing.
There are three steps that are executed in the following order:
- Dividing the graph's area into several rectangular cells (see: IPartition , GraphPartition , PartitionCell ).
- Finding the shortest/cheapest paths for all edges through the Partition (see: PathSearch , Path ).
- Assigning coordinates to the edges' segments based on the paths that were calculated before (see: ChannelBasedPathRouting ).
IGraphPartitionExtension s add obstacles which the PathSearch will consider. They also can add some information to PartitionCells that, for example, specifies whether or not the PartitionCell belongs to a node.
PathSearchExtension s influence the PathSearch by adding costs for traversing specified PartitionCells or narrowing their intervals to allow a less expensive traversal of a PartitionCell. For example, the PathSearch adds costs to a PartitionCell that was marked as an obstacle that belongs to a node, so the edge will avoid the node.