OrgChart
OrgChart copied to clipboard
About the Family-tree model
I try to set a person node who married twice(two outsiders),the charts seems unreasonable
and I have some thought about family-tree:
Suggestions for Improving the Family-tree Model:
Optimization of Data Structure
A family tree is a model with continuously growing data and an infinite total set, making it unsuitable to store child node IDs within parent nodes. Instead, it is recommended to adopt a structure where child nodes carry parent node IDs. This design better aligns with the dynamic nature of family trees and supports modern data query technologies like GraphQL.
Handling Multiple Parent Relationships
In some cases, a child node may have multiple parent pairs (e.g., biological parents and adoptive parents). To accommodate this complexity, it is suggested to clearly designate a "primary parent" within the child node’s parent ID field. This allows for prioritization based on cultural or legal requirements.
Support for Multiple Spouses and Child-Parent Marriage Association
The current model does not adequately handle scenarios involving multiple marriages or concurrent spouses (e.g., polygamy or polyandry). It is recommended to extend the model to support multiple spouse relationships and ensure that children can be clearly associated with a specific spouse pair. For example, a field could be added to child nodes to explicitly link them to a particular marital relationship (e.g., marriage ID or spouse pair ID), ensuring accurate representation of complex family structures and bloodlines.
Hi @xgocn I have created a Demo for you -- https://codepen.io/dabeng-the-styleful/pen/KwKPzYO. I think this demo can illustrate enough detailed teach points of Family Tree.
In fact, you can always append custom properties(like the "gender", "adopted", "ex" mentioned above) in your own datasource, then feel free to build up the family tree based on these ultra properties provided by yourself.