Hi Walter,
Actually my users given the below requirements:
- Links should not be passing through nodes.
- There should not be any unnecessary bends in the genogram on default load
3.Remarks displayed should not overlap with the nodes or the links on the genogram (i.e. this should be displayed clearly for the user to read). Overlap should be minimized.
Please see the below answers as my way of achieving the above given requirements:
-
Links should not be passing through nodes.
A. Used AvoidsNodes routing for all links used in the genogram. So links are not passing to nodes
-
There should not be any unnecessary bends in the genogram on default load.
A. If I will use AvoidsNodes routing then bends are displaying like shown in the below figure.

But they need like below screenshot.

I can use Normal routing but links are passing inside the nodes. This impacts the 1st requirement.
I told that this is not possible if we use AvoidsNodes routing. AvoidsNodes routing will give bends to
avoid the nodes.I told that this is not doable. Please let me know whether my answer is correct or not?
-
Remarks displayed should not overlap with the nodes or the links on the genogram (i.e. this should be displayed clearly for the user to read). Overlap should be minimized.
A. This is what we are discussing till now which I posted to you that is in subject name.
Because of above two reasons ( for requirements. 1 and 2 ), I am using AvoidsNodes routing.
For node creation with name,occupation and nodeRemarks I used the below code for each node:
Below code is sample code for one node:
myDiagram.nodeTemplateMap.add("F",
$(go.Node, "Vertical",
{ locationSpot: go.Spot.Center, locationObjectName: "ICON",avoidable: true },
$(go.Panel, "Horizontal", {width:180},
$(go.Picture, {alignment:new go.Spot(0, 0, 60, 0), desiredSize: new go.Size(30, 30),width: 30, height: 30,margin:1},
new go.Binding("source","group" ))),
$(go.Panel,
{ name: "ICON" },
$(go.Shape, "Circle",
{ width: 40, height: 40, strokeWidth: 2, fill: "white", portId: "" }),
$(go.Panel,
$(go.TextBlock, { alignment: go.Spot.Center, margin: 15 }, new go.Binding("text", "age"))
)
),
$(go.TextBlock,{background:"white"},new go.Binding("text", "name")),
$(go.TextBlock, { visible: false,width: 60 }, new go.Binding("text", "occupation"),new go.Binding("visible", "occupation",
function(t) { return !!t; })),
$(go.TextBlock,{margin: 2,wrap: go.TextBlock.WrapFit, isMultiline: true,maxSize:new go.Size(90, 100)},new go.Binding("text", "nodeRemarks"))
));
But I don't know why TextBlocks should not avoided.
```
Each link is connected to the nodes if I mention the node-node relationship. Here connected to nodes means "not using connected points". Just link touching to node. I did not use port anywhere.
I did not use/set **GraphObject.portId** anywhere in my genogram code.
These are my answers to your questions.
Please let me know if I missed anything.