Handle link shapes

I’m looking to control the appearance of the links in my diagram. Ideally, I want the links to take a straight path whenever viable, connecting directly to the target node without unnecessary curves or bends. Additionally, I’d like to introduce flexibility by allowing some links to originate from either the left or right side of a node, ensuring distribution not only from the top and bottom. I plan to implement this functionality with dynamically created nodes. Could you provide a demonstration of how I can achieve this?

I assume there is only a single large port on each Node. Try setting its fromSpot and toSpot to go.Spot.AllSides and Link.routing to go.Link.AvoidsNodesStraight (not documented).

go.Link.AvoidsNodesStraight when apply this to routing some error occurred property doesnot exist

As I said, it’s not documented.