Genogram Questions

I’m testing out the gojs genogram based on the sample and so far I love it. I do have a couple of questions.

Can you add a child with only having a single parent?

I’m alsogetting strange results on the positioning of larger families. Check out the attached screenshot. My loading data looks like this:

[
  {
    "key": 1,
    "n": "asdf 1",
    "s": "M",
    "m": 3,
    "f": 2
  },
  {
    "key": 2,
    "n": "Father 2",
    "s": "M",
    "ux": 3,
    "m": 13,
    "f": 12
  },
  {
    "key": 3,
    "n": "Mother 3",
    "s": "M",
    "vir": 2,
    "m": 15,
    "f": 14
  },
  {
    "key": 4,
    "n": "Brother 1 4",
    "s": "M",
    "m": 3,
    "f": 2
  },
  {
    "key": 5,
    "n": "Brother 2 5",
    "s": "M",
    "m": 3,
    "f": 2
  },
  {
    "key": 6,
    "n": "Sister 1 6",
    "s": "F",
    "m": 3,
    "f": 2
  },
  {
    "key": 7,
    "n": "Sister 2 7",
    "s": "F",
    "m": 3,
    "f": 2
  },
  {
    "key": 12,
    "n": "Paternal Grandfather 12",
    "s": "M",
    "ux": 13
  },
  {
    "key": 13,
    "n": "Paternal Grandmother 13",
    "s": "F",
    "vir": 12
  },
  {
    "key": 14,
    "n": "Maternal Grandfather 14",
    "s": "M",
    "ux": 15
  },
  {
    "key": 15,
    "n": "Maternal Grandmother 15",
    "s": "F",
    "vir": 14
  },
  {
    "key": 16,
    "n": "Paternal Uncle 1 16",
    "s": "M",
    "m": 13,
    "f": 12
  },
  {
    "key": 17,
    "n": "Paternal Uncle 2 17",
    "s": "M",
    "m": 13,
    "f": 12
  },
  {
    "key": 18,
    "n": "Paternal Aunt 1 18",
    "s": "F",
    "m": 13,
    "f": 12
  },
  {
    "key": 19,
    "n": "Paternal Aunt 2 19",
    "s": "F",
    "m": 13,
    "f": 12
  },
  {
    "key": 20,
    "n": "Maternal Uncle 1 20",
    "s": "M",
    "m": 15,
    "f": 14
  },
  {
    "key": 21,
    "n": "Maternal Uncle 2 21",
    "s": "M",
    "m": 15,
    "f": 14
  },
  {
    "key": 22,
    "n": "Maternal Aunt 1 22",
    "s": "F",
    "m": 15,
    "f": 14
  },
  {
    "key": 23,
    "n": "Maternal Aunt 2 23",
    "s": "F",
    "m": 15,
    "f": 14
  }
]

I think the problem is that the GenogramLayout defined in that sample still assumes that the family tree is basically tree-structured. (Note that it inherits from TreeLayout.) Arranging to show uncles/aunts on both sides of the family is beyond its current scope. If we get time, we could improve that, but I cannot promise it. I suppose it would be easier to implement if there were specific restrictions regarding the kinds and numbers of relationships it needed to show. “Peyton Place” style graphs would be hard to optimize.

I’m trying to do a genogram of someone with 4 generations. Great grandparents through children. So there are some limits but they are rather large.

Even with just grandparents I can’t get it to position correctly.

When both paternal and maternal lineages are included, the graph stucture is not a tree. Normally one would use LayeredDigraphLayout instead of TreeLayout, but such customization has not been done, unlike the genogram sample.

I’ll see if there is a partial solution to that problem, perhaps by doing something like the DoubleTree sample.

OK, so as I said before, the problem is that the GenogramLayout does not handle non-trees. In other words, when both a husband and a wife have ancestors, it isn’t a “tree”, so the results aren’t what you would like.

I haven’t made any real improvements, but this minor modification of Genogram.html provides a better result: [moved to be http://gojs.net/latest/samples/genogram.html]. The assumption is that the diagram is focusing on only one marriage, “Aaron” and “Alice” in this case.

It is depending on the maternal ancestors of “Alice” being laid out after the rest of the family, and that there are just as many generations of ancestors of “Aaron” as there are of “Alice”.

It’s still possible for links to cross each other, resulting in coincident segments which appear ambiguous/confusing.

The regular Genogram sample, http://gojs.net/latest/samples/genogram.html, has been improved to handle a simple non-tree. It also highlights a person whose father and whose mother both have their own families in the graph.