Search
TopologicalLayout Class
Remarks See Also
 





Applies topological ordering to the graph. This layout makes it easy to discern graph features such as overall flow direction, cycles and nested cycles.

Namespace: MindFusion.Diagramming.Layout
Assembly: MindFusion.Diagramming.Layout

 Syntax

C#  Copy Code

public class TopologicalLayout : Layout

Visual Basic  Copy Code

Public Class TopologicalLayout
    Inherits Layout

 Remarks

Topological ordering of graph nodes is one where link's origin node is placed before link's destination. TopologicalLayout arranges nodes in a row or a column (depending on the value of the Orientation property) in such a way that there are no backward links when the graph is acyclic. If the graph contains cycles, the algorithms selects ordering with as few backward links as possible.

Links that connect non-adjacent nodes are rendered as arcs. Links connecting adjacent nodes can be rendered either as arcs or as straight lines, depending on the BendAdjacentLinks property. The amplitude of link arcs is proportional to the distance between respective connected nodes. All forward links are rendered at one side of the nodes and all back links are rendered at the opposite side. Thus, all bent links follow the same rotation direction.

 Example

The following example applies TopologicalLayout to the diagram:

C#  Copy Code
var layout = new TopologicalLayout();
layout.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
diagram.Arrange(layout);
diagram.ResizeToFitItems(5);

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            MindFusion.Diagramming.Layout.Layout
                MindFusion.Diagramming.Layout.TopologicalLayout

 See Also