Hierarchical is a layout style that portraits the precedence relation of directed graphs. It is ideal for many application areas, especially for
Use Hierarchical layout style to highlight the main direction or flow within a directed graph. Cyclic dependencies of nodes will be automatically detected and resolved. Nodes will be placed in hierarchically arranged layers. Additionally the ordering of the nodes within each layer is chosen in such a way that the number of line (or edge) crossings is small.
Incremental hierarchical layout is an interactive variant of the classic hierarchic layout described above. Compared to the "normal" layout algorithm which computes an all-new, fresh graph layout each time it is invoked, the main advantage of the incremental layout is that distinct parts of a graph can be rearranged while the remainder of the graph is not, or only slightly, changed.
Especially in an interactive environment, where a user modifies a graph (i.e. adds, deletes, moves, or resizes graph elements), this technique makes it possible to maintain the user's so-called "mental map" over a course of subsequent graph layouts.
Selected Elements Incrementally
If enabled, the selected nodes or edges will be automatically integrated into the current layout. The existing layout will only be slightly adjusted.
Use Drawing As Sketch
If enabled, the current drawing will be interpreted as a sketch of the resulting hierarchical layout. Note that the 'From Sketch' settings located in the 'Layers' tab can be used to fine-tune sketch parsing.
Determines the main layout orientation. The algorithm tries to arrange nodes in such a way that all edges point in the main layout direction.
- Top to Bottom
- The main layout orientation will be from top to bottom.
- Bottom to Top
- The main layout orientation will be from bottom to top.
- Left to Right
- The main layout orientation will be from left to right.
- Right to Left
- The main layout orientation will be from right to left.
Layout Components Separately
Determines whether the components of a graph should be processed separately.
If a graph consists of multiple overlapping components, then these overlaps are resolved. This can be undesirable, especially if the current layout should be used as sketch to calculate a new arrangement. When in interactive mode, this feature should be disabled to provide more control about the arrangement of separate graph components.
Determines whether possible symmetries in the placement should be detected and obeyed. This option increases computation time.
Specifies a preferred time limit (in seconds) for the layout algorithm. Note that restricting the maximal duration may reduce the overall layout quality. Furthermore, the actual runtime may exceed the maximal duration because the layout algorithm still has to find a valid solution.
Node to Node Distance
Determines the minimal distance between adjacent nodes that reside in the same layer.
Node to Edge Distance
Determines the distance between horizontal edge segments and nodes.
Edge to Edge Distance
Determines the distance between adjacent pairs of horizontal edge segments.
Layer to Layer Distance
Determines the minimal distance between nodes that reside in adjacent layers.
- Edge paths will be routed in an orthogonal style, i.e. only vertical and horizontal line segments will be used. Orthogonal edge routing increases the height of the layout.
- Edge paths will be routed as a polyline with a certain number of bends.
- Edge paths will be routed in an octilinear style, i.e. the routes consist of line segments whose slope is a multiple of 45 degrees.
If enabled, all edges that do not point in the main layout direction will be routed as backloops.
Automatic Edge Grouping
If enabled, the layout algorithm will group edges at either source or target node to create bus-style edge path routings that will result in a more space-efficient layout. Edges are grouped in such a way that no ambiguous paths are created.
Minimum First Segment Length
Determines the minimal length of the first edge segment.
Minimum Last Segment Length
Determines the minimal length of the last edge segment.
Determines the minimal length of an edge.
Minimum Edge Distance
Determines the distance between adjacent pairs of horizontal edge segments.
Determines the minimal slope of the first and last edge segments with polyline edges. This feature is only available for the polyline routing style
Port Constraint Optimization
If enabled, edges will be allowed to connect to all sides of a node if the number of edge crossings can be reduced this way.
Recursive Edge Routing
- Edge paths can leave or enter group or folder nodes at all sides in order to connect as directly as possible.
- Edge paths always leave group or folder nodes at the bottom and enter them at the top side.
- Edge paths always leave group or folder nodes at the bottom or the top side. This style is more compact than the directed recursive routing style.
Consider Edge Thickness
If enabled, the thickness of edges will be considered for minimum distance computations. Otherwise, minimum distances might be violated or overlaps between edges can occur when having thick edges.
Arrows define Edge Direction
If enabled, the arrowheads will be used to derive the direction of edges. An edge with an arrow at one end is considered to be directed; the layout algorithm will try to draw the edge such that the arrow points into the main layout orientation (e.g. downwards for orientation "Top to Bottom"). An edge without arrows or with arrows at both ends is considered to be undirected, which means that its direction is not important.
If this feature is disabled, all edges will be treated as directed, hierarchic edges, regardless of the specified visual arrowhead.
The algorithm puts each node in a horizontal layer together with other nodes. The number of the layer where a node resides is also called node rank.
Layer Assignment Policy
- Hierarchical - Optimal
- The layer distance of an edge is the absolute difference between the ranks of its source and target node. Layer assignment will be done in such a way that the overall sum of the layer distances of all edges in the layout is minimal.
- Hierarchical - Tight Tree Heuristic
- A fast heuristic that also tries to minimize the overall sum of layer distances of all edges.
- BFS Layering
- Ranking based on a breadth first search. All edges will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are possible. Places all selected nodes in the first layer. If no nodes are selected then nodes that have no incoming edges are placed in the first layer.
- From Sketch
- Policy that uses the initial y-coordinates of the nodes to determine a node layering. It tries to find a layering that is similar to the one in the input graph. When this ranking policy is used, the layouter may place nodes that are connected by an edge in the same layer.
- Hierarchical - Topmost
- All nodes with indegree zero will be assigned the topmost layer of the layout.
Alignment within Layer
Determines the alignment of nodes within one layer.
- Top Border of Nodes
- The top border of nodes will be aligned.
- Center of Nodes
- The geometric center of nodes will be aligned.
- Bottom Border of Nodes
- The bottom border of nodes will be aligned.
If enabled, nodes are placed in a more compact, stacked style. The layout algorithm will place the nodes of a layer horizontally interleaving in an upper and lower sub-layer. While this setting may decrease the width of the layout, it will increase the required layout height.
From Sketch Settings
These settings influence the strategy used to assign nodes to certain layers when the options 'Use Drawing As Sketch', 'Selected Elements Incrementally' or 'Rank Assignment - From Sketch' are set. The standard strategy assigns two nodes to the same layer if there exists a horizontal line that crosses through both of their bounding boxes.
Artificially scales the nodes by the given factor before the rank assignment is performed. The bigger the value to more likely that nodes will be assigned to the same layer.
Artificially enlarges the nodes by the given value before the rank assignment is performed. The bigger the value to more likely that nodes will be assigned to the same layer.
Nodes smaller than the given value will be enlarged to match the given size before the rank assignment is performed. The bigger the value to more likely that nodes will be assigned to the same layer.
Nodes larger than the given value will be shrinked to match the given size before the rank assignment is performed. The smaller the value to more likely that nodes will be assigned to different layers.
Options in this tab determine the labeling strategy used by this layouter.
Consider Node Labels
Determines whether node labels should be considered in the layout process.
- Automatic edge labeling is deactivated.
- Edge labels will be automatically placed after the hierarchic layouter has placed the nodes and edges. Edge labels may overlap with other elements if there is not enough space to place the labels properly. The resulting graph layout remains compact.
- Edge labels will be considered in the hierarchic layout process. Nodes and edges will be arranged in such a way that there is enough space for the edge labels not to overlap.
Edge Label Model
Determines which positions will be available for the edge labels.
- The default. Chooses the model that fits the specified edge labeling strategy best.
- As Is
- Uses the individual label models that are currently set on the input graph. Individual models for edge labels can be changed in the edge or edge label property dialog.
- Center Slider
- Allows labels to be placed somewhere on the corresponding edge path. This option is a good choice for Generic and Hierarchic edge labeling.
- Side Slider
- Allows labels to be placed along both sides of the edge path. This option is a good choice for Generic edge labeling.
- Allows labels to be placed anywhere. This model is a very good choice for Hierarchic edge labeling. It is not compatible with Generic edge labeling and should therefore not be used in that combination.
This tab can be used to configure the behavior of the layout algorithm if used on nested/grouped graphs.
Determines the basic policy for the layout process.
- Ignore Groups
- Group nodes will be ignored for calculating the layers.
- Layout Groups
- Calculation of layers takes group nodes into account.
Determines whether the number of layers shall be small.
Determines the layer for nodes that are adjacent to group nodes whose contents span multiple layers. If the nodes can be placed into more than one of these layers, then 'vertical alignment' determines their actual layer.
- Nodes will be placed into the same layer as the topmost nodes inside the group node.
- Nodes will be placed into one of the layers of the middle nodes inside the group node.
- Nodes will be placed into the same layer as the bottommost nodes inside the group node.
Horizontal Group Compaction
Determines the level of group node compactness.
- Groups will be compacted only lightly.
- Groups will be compacted to the maximum extent.
Treat groups as swimlanes
If enabled, top level group nodes will be interpreted as swimlanes. In this case, the placement policy for these nodes is no longer strictly hierarchical but rather these groups (and their content) are placed horizontally next to each other for layout orientations "Top to Bottom" and "Bottom to Top" and vertically next to each other for layout orientations "Left to Right" and "Right to Left".
Use sketch for lane order
If enabled, the prelayout position of top level groups that are treated as swimlanes determines the swimlane ordering for the algorithm. If disabled, the swimlane odering is determined in a way that tries to minimize edge crossings.
Specifies the minimum distance between top level groups that are treated as swimlanes.
If enabled, the layouter will place nodes and bends on grid coordinates. The anchor point of the nodes depends on the 'vertical alignment' within layers which is described above. In case the nodes are centered, the anchor point is located in the center of the node. When nodes are top or bottom aligned the anchor point is at the node's top or bottom border.
Specifies the spacing between two grid coordinates.
Determines the way in which edge ports are distributed at the nodes.
- This style is equivalent to the style used when grid is disabled. The ports are evenly distributed regardless of the grid information.
- On Grid
- This style places the ports on grid coordinates that intersect with a node. If there are not enough grid coordinates available to distribute all incident edges, edges may be assigned to the same port location (i.e. edges may partly overlap).
- On Subgrid
- This style tries to place the ports on grid coordinates that intersect with a node. If there are not enough grid coordinates available to distribute all incident edges, additional locations are generated by iteratively cutting the grid spacing into halves. Hence, the grid spacing is an integer multiple of the used subgrid spacing.