Nevron .NET Vision
Diagram for .NET / User's Guide / Layouts / Diagram Layout Overview

In This Topic
    Diagram Layout Overview
    In This Topic

    Nevron Diagram for .NET features strong support for automatic graph layouts. Although the layouts are mainly designed to work with diagram shapes they can virtually operate with other types of objects.

    The layouts are located in the Nevron.Diagram.dll assembly and are isolated in the Nevron.Diagram.Layout namespace. All code examples in this chapter assume that you are using the Nevron.Diagram.Layout namespace and the Nevron.Diagram.dll assembly is referenced by your project:

    C#
    Copy Code
    using Nevron.Diagram.Layout;
    
    Visual Basic
    Copy Code
    Imports Nevron.Diagram.Layout
    

    Based on whether the layout arranges only the vertices or both the vertices and edges of a graph, layouts are primary divided in two categories:

    Following is a brief summary of the implemented layouts:

     Graph Layouts

    Layout Description
    Barycenter Layout Force directed layout, which splits the input graph vertices in two distinct sets - fixed and free vertices. Fixed vertices are placed at the corners of a strictly convex polygon. Free vertices are then placed in the center of their mass (barycenter).
    Spring Layout Force directed layout, which uses a spring force and electrical force couple. The spring force tries to enforce a certain distance between connected vertices. The electrical force repels the vertices which are close to each other.
    Symmetrical Layout Force directed layout, which aims to make the edge lengths equals in size and also repels vertices which are close to each other.
    Layered Graph Layout Hierarchical graph layout, which first distributes the graph vertices to layers. Then it tries to minimize the edge crossings on a layer by layer basis. Finally the layout performs the breadth vertex placement and edge routing step. Supports both polyline and orthogonal edge routings.
    Orthogonal Layout Produces orthogonal graph drawings, which satisfy a number of aesthetic criterias including: minimal number of edge crossings, minimal number of edge bends, compactness etc.
    Radial Graph Layout Layouts graphs in concentric circles. The vertices with no predecessors are placed in the center and their descendants are placed on the next circle and so on. It produces a straight line graph drawing.
    Single Cycle Graph Layout Layouts all graph vertices on a single circle, trying to minimize the number of edge crossings. Produces a straight line graph drawing.
     Tree Layouts
    Layout Description
    Layered Tree Layout Layouts the tree vertices in layers. Supports breadth compaction, layer alignment, straight and orthogonal edge routing, layer and vertex spacing etc. Supports layout direction (e.g. left-to-right, top-to-bottom etc.)
    Compact Depth Tree Layout The depth arrangement of the vertices is as compact as possible. Supports breadth compaction, straight and orthogonal edge routing, parent-child spacing etc. Supports layout direction (e.g. left-to-right, top-to-bottom etc.)
    Tip - Over Tree Layout Layouts the children vertices of a parent vertex in either a single row or a single col. The children arrangement can be specified on a per vertex basis. Supports overall compaction, horizontal and vertical spacing etc.
    Balloon Tree Layout Layouts the children vertices in a single circle around its parent vertex. Automatically resolves overlaps. Can be constrained to place the children vertices in a polar angular range.
     Cells Layouts
    Layout Description
    Stack Layout

    Stacks the cells in the layout direction (e.g. left-to-right, top-to-bottom etc.). Supports different filling/fitting modes, which control the way in which the layout tries to inflate/deflate the cells to fully occupy the available area.

    Flow Layout Flows the cells in the layout direction (e.g. left-to-right, top-to-bottom etc.). Can be constrained to switch to a new lane either by size or by ordinal. Supports lane justification.
    Table Layout Similar to a flow layout, but can be instructed to preserve tabular metrics in different ways.
    Dock Layout Places the cells at per-vertex specified docking areas of the currently available layout area. Supports advanced filling and fitting modes.