ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
521 stars 139 forks source link

Code to generate data object #62

Open Spiruel opened 6 years ago

Spiruel commented 6 years ago

Does anybody have pseudo code / code for the generation of the data? Something like a recursive function to output JSON from an input of family information. Thanks

ucay commented 6 years ago

This is an example using Symfony 3 Framework. Symfony 3 Query for family tree But it's still one root family, because I just need one root for each family tree.

And my simple family tree database is like this. family-tree

Hope it help.