Linkages are not showing properly in LayeredDigraphLayout

Hi
I want Proper View For linkages in LayeredDigraphLayout.

  1. is there any way to adjust Auto layer Spacing according to Linkages in LayeredDigraphLayout?

Layout:
layout: $(go.LayeredDigraphLayout,
{
direction: 90,
layerSpacing: 120,
columnSpacing: 40,
linkSpacing: 60,
setsPortSpots: false,
packOption: go.LayeredDigraphLayout.PackMedian, //change For Bug
// setsChildPortSpot: false
}),

LinkTemplate:
myDiagram.linkTemplatemap1 =
$(go.Link,
{
curviness: 5,
layerName: “Background”,
routing: go.Link.Orthogonal,
corner: 8,
// mouse-overs subtly highlight links:
mouseEnter: (e, link) => link.findObject(“HIGHLIGHT”).stroke = “rgba(92, 8, 51, 0.26)”,
mouseLeave: (e, link) => link.findObject(“HIGHLIGHT”).stroke = “transparent”,
selectionAdorned: false,
//setsPortSpot: false, setsChildPortSpot: false//
},

Diagram:

You have set LayeredDigraphLayout.linkSpacing to a huge value. Please decrease it to a reasonable value such as 3 or 4.

You could increase the value of LayeredDigraphLayout.layerSpacing.

I assume you are really asking whether a value for layerSpacing could be computed based on the maximum number of horizontal link segments there are in between the layers. I don’t think we have any such code, although one could implement that by doing a layout, detecting whether there are any links going through any nodes, and trying again with a larger value for layerSpacing.