Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parents of spouses #78

Open
curtisdelicata opened this issue Jun 14, 2018 · 13 comments
Open

Parents of spouses #78

curtisdelicata opened this issue Jun 14, 2018 · 13 comments
Labels

Comments

@curtisdelicata
Copy link

Does this support showing the parents of spouses? I've got it working with Vue for default data but unsure of the JSON?

@aroraank
Copy link

Did you find any way to add parents of spouses?

@ErikGartner
Copy link
Owner

Sorry, I don't have the time to work on new features for dTree. Feel free to make a pull request if you have a good solution :)

@saqibameen
Copy link

saqibameen commented Sep 12, 2019

@curtisdelicata @aroraank Did you find any solution?

@ErikGartner
Copy link
Owner

No, unfortunately I don't have time right now to add new features to dTree. If you implement the feature be sure to make a pull request!

@saqibameen
Copy link

@ErikGartner can you give me some direction in implementing this feature?

@ErikGartner
Copy link
Owner

The problem with implementing parent support is that dTree uses d3 as its underlying layout engine. Therefore the family tree can't have multiple roots as would be required.

So as I see it you have to writing a custom layout algorithm.

@saqibameen
Copy link

I was thinking on the same grounds. That's gonna take a lot of time.

Is there any way we can build separate tree for the parents of spouse and connect the nodes?

@ErikGartner
Copy link
Owner

You could build separate trees but then you still have to do some calculation for where to lay them out without overlapping which is the tricky part.

I would start with experimenting by building multiple trees in the same SVG and then figuring out how to align them. And then calling the function in dTree to connect the nodes between the trees.

I know I'm being vague but there are many steps to solve this problem which require some serious thought and unfortunately I do not the time required to give better guidance.

Best of luck!

@saqibameen
Copy link

That makes sense. There's a lot to figure out to make it work. If I come up with a solution will definitely share with you. Thanks

@georg-braun
Copy link

georg-braun commented Nov 15, 2019

Hey, maybe this will help you.

I used dTree to build my own family tree. But I also wanted to be able to show the parents of the spouses. So I wrote a little converter that converts a family graph data structure to a tree structure with the selected root node.
https://www.npmjs.com/package/graphtodtreeconverter

You can find the usage of the converter in this example https://stammbaum.georg-braun.de/
Spouses with parent information are highlighted with a red border. A left click on the node will change the family tree to "another" tree.

@ErikGartner
Copy link
Owner

@velox1992 Very cool solution and also good for making large graphs manageable!

@DucNguyenPTIT
Copy link

@ErikGartner how about considering parents as children and drawing accordingly, but then rotating them upward?

@ErikGartner
Copy link
Owner

Then you would impose the same restriction on the children instead of the parents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants