Horizontal view of unlinked nodes in TreeLayout or LayeredDigraphLayout

Hi I am creating a diagram where initially the unlinked nodes should placed in horizontal position and when I link the nodes then they should also kept in same horizontal position and I want to achieve this with LayeredDigraphLayout or TreeLayout.

So is there any way available to do this or I have to create my own custom layout?

Could you please post some before-and-after sketches or screenshots showing what behavior you want?

I want to use TreeLayout or LayeredDigraphLayout

myDiagram = new go.Diagram("myDiagramDiv", {
      "undoManager.isEnabled": true,
      // layout: $(go.LayeredDigraphLayout, { direction: 0 })
      layout: $(go.TreeLayout)

Attached two images of linked and unlined nodes where the linked nodes are coming in horizontal position but the unlinked nodes are coming vertically I wants to move them in horizontal position

I’m not sure I understand the problem. Is it basically that when using TreeLayout you want the unconnected nodes to be positioned in a horizontal row? If so, try setting TreeLayout.arrangement to go.TreeLayout.ArrangementHorizontal.

Yes you got it right. And Thanks I got the solution.