How to avoid link and nodes overlapping

Hello,
I receive a list off nodes and links (without information about the positions) and I want to avoid overlapping of nodes and links as shown in my png. How can I do that ?
Thanks in advance.

dia

let textLinkTemplate =
$(go.Link, // the whole link panel
{ routing: go.Link.AvoidsNodes, curve: go.Link.JumpOver }, // link route should avoid nodes
$(go.Shape, { stroke: “rgb(46, 117, 182)” }),
$(go.Shape, { toArrow: “Standard”, stroke: “rgb(46, 117, 182)” }),
$(go.TextBlock, // this is a link label
{stroke: “white”,
background: “rgb(170, 170, 170”,
width: 70,
height: 20,
verticalAlignment: go.Spot.Center,
textAlign: “center”},
new go.Binding(“text”, “text”))
);

let editedTemplate = $(go.Node, ‘Auto’,
$(go.Shape, ‘Ellipse’, {width: 100, stroke: “rgb(38, 112, 178)”, fill: “rgb(46, 117, 182)”}),
$(go.TextBlock,{cursor: “pointer”, margin: 8, editable: true, stroke: “rgb(202, 212, 221)”},
new go.Binding(‘text’).makeTwoWay()),
{
click: function(e, obj) { // @ts-ignore
window.alert("Edit diagram of " + obj.part.data.text); },
}
);

None of the link paths seem to be overlapping any nodes, so it must be the link labels that you are concerned about. I see “Stop”, “Hold”, and “Unhold” being a problem. Is the “Abort” label a problem? Where would you expect “Stop” to be placed?

Could you instead change the layouts so that there is more horizontal space between the nodes, so that there would be room for labels like “Stop”?

We are working on an extension to automatically reposition link labels, but it is unfinished.

The problem is the links. For example, after moving some nodes from the same dia, the graph is now more readable but it’s not completely readable.
I want that the nodes and the links are automatically position without links overloading to be able to read the diagram correctly.