Arrow as Link


I want a Link-Template which makes a link between two nodes similar to the following link:

But with every template I tried the link contains three lines: one line is going out of the node in a right angle, one line is coming into the node in a right angle and one line connecting these both lines.

What do I have to do to have just one line for a link?

Thank for every help!


You have to make sure that the ports don’t have their go:Node.FromSpot and go:Node.ToSpot set – i.e. they need to be None. That actually is their default value.

However, if you are using TreeLayout or LayeredDigraphLayout, they default to assigning the Route.FromSpot and Route.ToSpot on the links. These properties take precedence over the corresponding values on the ports/nodes. These layouts do this because there is a natural direction inherent in the layout that it wants to enhance, so it assigns appropriate spots.

But if you don’t want those layouts to do that, set TreeLayout.SetsPortSpot and SetsChildPortSpot to false, or set LayeredDigraphLayout.SetsPortsSpots to false.

Thanks Walter!

Do I understand right: It is not possible to set FromSpot/ToSpot and have still a straight line?


Well, the route might still be a straight line.

But the purpose of the port spots is to tell the link’s Route about how to approach and connect to the port. Spot.None means “use the closest intersection point with the edge”.