Change link curviness in the middle


I’m looking for a way to change link curviness in the mid point.
Each link have a label in the middle and I would like to change the curviness at that point to create an “S” shaped link.
Is there a way to do so without having to split the link into two different links?
(The link properties are : curve: Bezier, curviness: a constant number)

Could you provide a sketch or screenshot of how you’d like the links to look?

This is a simple sketch of the link. For now I’m drawing two different links, a link to the label and a link from the label and then hiding the original link between the nodes. Is there a better way to achieve it without the additional two links?

What if you just used Orthogonal links with a huge corner value?

Hi, unfortunately that would not solve my problem. First of all, the connection points between the link and the nodes are not in the correct place according to my sketch (shortest path between the nodes), and second of all the link just don’t look like the “S” shape link in my sketch. To solve this problem I’ve used label nodes on the link, than connect those label nodes to the link “from” and “to” nodes with two additional links, change those link curviness to look like the sketch and finally I changed the original link storke to be null. Thank you all for the fast reply and if there are any other suggestion I would love to hear them.

Another related question will be this. because I’m using label nodes I would like to have an option to control the fraction in which the label is drawn. When assigning the label node to a link the label is drawn in the middle of the link. How can I control the “segmentFraction” of the label node (meaning drawing the label closer to one of the nodes)?

Your current approach seems reasonable if it’s meeting your requirements. One other option could be overriding the Link.computePoints method to suit your needs. An example of overriding that method can be seen in Multi-Node Path Links.

To control where the label node gets drawn, you should use a combination of GraphObject.segmentIndex and GraphObject.segmentFraction.