Multiple marriages with children - Genogram

Hi,

I’m currently trying to add children to a genogram that contains multiple marriages, and I’m seeing some rendering issues. When using the following dataset, I get the output below :

   var familyData = [
     { key: 0, n: "Wife 1", s: "F", vir: [1] }
     ,{ key: 1, n: "Husband 1", s: "M", ux: [0] }
     ,{ key: 2, n: "Child 1", s: "F", m: 0, f: 1 }
     ,{ key: 3, n: "Child 2", s: "F", m: 1, f: 0 }
     ,{ key: 4, n: "Husband 2", s: "M", ux: [0] }
    ];

As you can see, the spouses are not aligned horizontally

If I remove the children from the data set, the spouses remain inline.

Ideally, I need the output to be like the following, so that any children always come underneath their parents:

Would you be able to point me in the right direction in regards to achieving this please?

Thanks,

Rob

Hmmm. That is odd. The LayeredDigraphLayout does not force all husbands and wives to be in the same layer, so I suppose this could happen. The results for

     { key: 0, n: "Wife 1", s: "F", vir: [4,1] }
     , { key: 1, n: "Husband 1", s: "M" }
     , { key: 2, n: "Child 1", s: "F", m: 0, f: 1 }
     , { key: 3, n: "Child 2", s: "F", m: 0, f: 1 }
     , { key: 4, n: "Husband 2", s: "M" }
     , { key: 5, n: "Child 21", s: "M", m: 0, f: 4 }
     //, { key: 6, n: "Child 22", s: "F", m: 0, f: 4 }

are better. But swapping the order of the husbands for the wife produces not-so-perfect results.

We’ll look into improving the GenogramLayout.

I’m with the same issue:

Can you guide us on how should the GenogramLayout be changed?

Thanks!

When I get some free time, I’ll work on improving the layer assignment of spouses.

Hi @walter ,

would you please give us some hints on how we should start changing the GenogramLayout to get the desired result pointed by Rob?

Thank you!

I did work on that for a while. I decided that the best strategy to handle multiple marriages would be to implement a completely new GenogramLayout. But I’ve been busy with getting version 1.6 ready, so I haven’t had the time to work on this.

Hi @walter have you had a chance to update the GenogramLayout to support multiple marriages? Thank you.

No, I’m sorry, it’s been so busy here that I haven’t had time to do anything that requires such a big block of time. We’ll consider it for version 1.7.