dTree
dTree copied to clipboard
How to add parent of a node?
var node = [{
class: "sexM"
marriages: (2) [{…}, {…}]
name: "Satoshi Nakomoto",
parent: // Can I add this?
}]
dTree.init(node, FamilyTreeHelper.config);
In short the tree is always defined top down, define from the first parent(s) and then all of their children and grand children.
Children are definitely needed. But I think adding a parent can also be useful since I am interested in knowing both the ancestors and the descendants.
For example, I currently get this tree when I search for King Gustaf VI Adolf
,
But when I search for Prince Gustaf Adolf, Duke of Västerbotten
, I only get a tree like below,
I am also interested in knowing the ancestors of this person.
@ErikGartner thank you so much for the awesome library.
I was using the library in one of my projects. I was wondering if I could add the parents of a spouse? Is there any way?
Also looking for a way to achieve this. Will try to give it a go myself - see how it goes.
Anyone has successfully achieved this ?