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.
55 stars 16 forks source link

Cousin marriage #22

Closed harry265481 closed 9 months ago

harry265481 commented 2 years ago

Taboo as it is, it happened in history and I am attempting to display a historical tree. I attempted to set partners that were cousins and it broke

also, it looks a little funky because below is generated via php

{ id: 1,pids: [0], mid: 0,fid: 0,name: "James VI and I" }, 
{ id: 2,pids: [1], name: "Anne of Denmark" }, 
{ id: 3,mid: 2,fid: 1,name: "Henry Frederick, Prince of Wales" }, 
{ id: 4,mid: 2,fid: 1,name: "Elizabeth Stuart, Queen of Bohemia" }, 
{ id: 5,pids: [6], mid: 2,fid: 1,name: "Charles I of England" }, 
{ id: 6,pids: [5], name: "Henrietta Maria of France" }, 
{ id: 7,mid: 6,fid: 5,name: "Charles II of England" }, 
{ id: 8,pids: [10], mid: 6,fid: 5,name: "Mary, Princess Royal and Princess of Orange" }, 
{ id: 9,pids: [12], mid: 6,fid: 5,name: "James II of England" }, 
{ id: 10,pids: [8], name: "William II, Prince of Orange" }, 
{ id: 11,pids: [13], mid: 8,fid: 10,name: "William III of England" }, 
{ id: 12,pids: [9], name: "Anne Hyde" }, 
{ id: 13,pids: [11], mid: 12,fid: 9,name: "Mary II of England" },
ZornitsaPesheva commented 2 years ago

You can try using Clinks: https://balkan.app/FamilyTreeJS/Docs/Clink

nafisto commented 1 year ago

Is there a way to add Clinks in the data itself rather than in JS? It's a bit clunky to have to load the graph and then go back in and programmatically clinks.

(Of course, ideally, you would detect loops and show a warning... or better yet automatically add a Clink :-) )

ZornitsaPesheva commented 1 year ago

You can have a json object with clinks also say clinks: clinks