BALKANGraph / FamilyTreeJS

Build family tree app with BALKAN FamilyTreeJS library. Family Tree also called a genealogy or a pedigree chart, is a chart representing family relationships in a conventional tree structure.
50 stars 16 forks source link

Layout of fraternal polyandry #120

Open feizhaojun opened 3 weeks ago

feizhaojun commented 3 weeks ago

I found a layout issue which is triggered by the case:

Two brother of one family marry the same woman, and the brothers gave birth to their own children. When Clicking the "base_up" button which looks like a "♣️", it goes further problems.

Here is a demo: https://feizhaojun.com/pu/test.html

And my nodes data:

nodes: [
  { id: 1, name: "Gen-1-A", pids: [2], gender: "male" },
  { id: 2, name: "Gen-1-B", pids: [1], gender: "female" },
  { id: 3, name: "Gen-2-1-A", fid: 1, mid: 2, pids: [6], gender: "male" },
  { id: 4, name: "Gen-2-2-A", fid: 1, mid: 2, pids: [6], gender: "male" },
  { id: 5, name: "Gen-2-3-A", fid: 1, mid: 2, gender: "male" },
  { id: 6, name: "Gen-2-B", pids: [3,4], gender: "female" },
  { id: 7, name: "Gen-3-1", fid: 3, mid: 6, gender: "male" },
  { id: 8, name: "Gen-3-2", fid: 4, mid: 6, gender: "male" },
]

"Gen-3-1" is son of "Gen-2-1-A", but not obvious by the chart.

ZornitsaPesheva commented 3 weeks ago

We do not support such cases as "Two brother of one family marry the same woman" with the current version, but we are working on this Now can use clinks, separate trees ( and switch between them), or something as groups to show such relations.