How to avoid two same links between two nodes in genogram?

Hi Walter,

I have two keys. One key having hostile to other key (h:1) and another key represented vir:0 which means husband link to key 0. But Links are displaying as below:

image

It should have only hostile link. Is it possible to have like only hostile?

{"key": "0", "name": "person1","s":"M","h":"1"},
{"key": "1", "name": "person2","s":"F","vir":"0"}

I represesnted h:1 in key:0 and also represented vir:0 in key:1.
I customized the h and vir links like below:

	myDiagram.linkTemplateMap.add("NewLinkFormats",  
			$(go.Link, {selectable: false, routing: go.Link.Normal,isLayoutPositioned:true},
					$(go.Shape, { strokeWidth: 2 },
							new go.Binding("stroke", "patt", function(f) { return (f === "") ? "black" : "transparent"; }),
							new go.Binding("pathPattern", "patt", convertPathPatternToShape)),
							$(go.TextBlock, { margin: -2,segmentIndex: 2.6, segmentFraction: 0.5,alignment: go.Spot.Center,alignmentFocus: new go.Spot(0.5, 1, 0, 15) }, new go.Binding("text", "relationText")),//segmentOrientation: go.Link.OrientUpright
							$(go.TextBlock, { margin: -2,segmentIndex: 2.6, segmentFraction: 0.5,alignment: go.Spot.Center,alignmentFocus: new go.Spot(0.5, 1, 0, 15) }, new go.Binding("text", "srelationText"))
						
							
			))	 ;

myDiagram.linkTemplateMap.add("Marriage",  
 			$(go.Link,
 					{ selectable: false, routing: go.Link.Orthogonal,isLayoutPositioned:true  },
 					$(go.Shape, { strokeWidth: 2 },
 							new go.Binding("stroke", "patt", function(f) { return (f === "") ? "black" : "transparent"; }),
 							new go.Binding("pathPattern", "patt", convertPathPatternToShape)),
 							$(go.TextBlock, { margin: -2,segmentIndex: 2.6,alignment: go.Spot.Top,alignmentFocus: new go.Spot(0.5, 1, 0, 15) }, new go.Binding("text", "relationText")), //,wrap: go.TextBlock.WrapFit, isMultiline: true,maxSize:new go.Size(150, 100)
 							$(go.TextBlock, {margin: -2,alignment: go.Spot.Top,alignmentFocus: new go.Spot(0.5, 1, 0, 15)}, new go.Binding("text", "srelationText"))
 			));

var key = data.key;
var h= data.h;
var virs = data.vir;

if (relationCode == "h") {
	var remarks_h = data.h;
	mdata = { from: key, to: relationNumber, labelKeys: [mlab.key], category: "NewLinkFormats", 
         relationText:remarks(relationText,relationNumber,remarks_h,key), patt: "Hostile", toArrow: 
          "OpenTriangle" };
}
										
if (relationCode == "virs") {
	var remarks_m = data.m;
	mdata = { from: key, to: relationNumber, labelKeys: [mlab.key], category: "NewLinkFormats" , 
        relationText:remarks(relationText,relationNumber,remarks_m,key)};
}

Thanks,
Prameela.D

That’s unusual – in my experience people want to treat the marriage relationship differently from other relationships.

But if you want to do that, you could customize the “Marriage” link template to show that kind of stuff.

Or, perhaps easier, you could make that particular “Marriage” link transparent (opacity == 0.0), either with a Binding or by your code.