Ports

The Hierarchical Layout algorithm produces a layout where the majority of the links flow in the same direction. If the flow direction is towards the bottom, usually the incoming links are connected to the top side of the node and the outgoing links are connected to the bottom side of the node. It is also possible to specify on which side a link connects to the node, by using port side settings

To simplify the explanations of the port sides, we use the compass directions north, south, east, and west. The specified link flow direction is always towards south and the first level is towards north. If the flow direction is towards bottom, north is at the top, south at the bottom, east on the right, and west on the left side of the drawing. If the flow direction is towards right, north is on the left, south on the right, east at the top, and west at the bottom.

Port specifications are applied to those link ends that have the extremity mode "Free" in the Connection Style tab. You can specify at which port side a link connects to its source or destination node, or you can specify to which relative port location the link connects to the node, compared to the connection points of the other links. This is done by using a port index.

If a link has the port index -1, the layout algorithm calculates an appropriate connection point by taking the link connector style into account. All links with port index 0 are connected to the first port point at the side of the node, all links with port index 1 are connected to the second port point, and so on. The port points are evenly distributed at the node sides. The ports are ordered according to their indexes. On the north and south side of a node, the port indexes increase toward the east. On the east and west sides of a node, the port indexes increase toward the south. You can also specify how many ports are available on each side of a node. This is useful if you want to reserve free ports that don't have incident links. If the number of ports is specified as -1, the layout algorithm calculates the number of necessary ports automatically.

Ports per node

To specify how many ports are available at individual nodes, select a node rule in the "Style Rules" while holding the Ctrl-key. This node rule will appear selected additionally to the "GraphLayout" rule. Then, choose the number of ports for these nodes.

Port sides and indexes per link

To specify the port sides and the port indexes of individual links, select a link rule in the "Style Rules" while holding the Ctrl-key. This link rule will appear selected additionally to the "GraphLayout" rule. Then, choose the port sides and indexes for these links.