Closed M144-Coder closed 3 years ago
You need a recursive function, where you iterate through the current children and create a new edge between its parent und the child itself. Just google "recursive function" and you find many examples.
I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.
I am trying to display a family tree structure using this great library. But I am stuck at looping through the tree and adding it to the graph.
This is the tree class which holds the data of the family tree Inspired from this answer.
And this is the Person class which holds the person data:
I have constructed the graph view in the same way in the library example, but I am stuck at adding the nodes to the graph, here is my code:
Thanks for help.