chevron_right Demos chevron_right Port Alignment
Discover More
Book a live Demo

See yFiles in action

30 min • Online • No install required


For developers, PMs & tech leads

  • Quick-start walkthrough + a real integration example
  • Live Q&A with next-step recommendations

Prefer another tool over Zoom? Just say so when you book.

Opens our scheduling page with Zoom's booking widget embedded. Using it shares your data with Zoom under its Privacy Policy.

See yFiles in action

30 min • Online • No install required


For developers, PMs & tech leads

Prefer another tool over Zoom? Just say so when you book.

Opens our scheduling page with Zoom's booking widget embedded. Using it shares your data with Zoom under its Privacy Policy.

Port Alignment Demo

This demo shows how to implement port alignment in HierarchicalLayout.

The sample data contains edges that belong to different path groups, indicated by the different edge color. The demo code aligns all source and target ports with the edge paths by configuring the sourcePortAlignmentIds and targetPortAlignmentIds properties of the PortData.

As a result, the aligned source and target ports at every node have the same y-coordinate, creating the visual effect in which the edges seem to pass through the node.

Port alignment is particularly useful in graphs where there are paths passing through. It is less restrictive in comparison to port grouping, since the ports of the aligned edges can lie on two opposite sides of a node.

Things to Try