Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Family tree layout from spreadsheet

0 votes
I am trying to make a family tree, which is simple enough via drag-and-drop, but I would like to be able to do it via importing a spreadsheet.

 

 

For example, Jon is married to Abi, and they have one son, Joe.

 

I can make a spreadsheet that shows Jon -> Joe and Abi -> Joe when opened in yED, but this isn't compatible with Family Tree layout since there is no family node.

 

How would I make such a spreadsheet? I have checked the "Import of Excel Files" page, but it doesn't mention family nodes.
in Help by (140 points)

1 Answer

+1 vote

First, create a spreadsheet that has one row for each individual. These rows should have at least three columns, one for the name of the individual, one for the type of the individual (i.e. "male" or "female"), and one used as ID.
Then add one row for each family node you need. Specify a unique ID, keep the name column empty and use e.g. "family" as type.

When done with the nodes, add rows for the relations between the individuals. These rows should have two columns, one for the ID of the source node (individual) and one for the ID of the target node (individual).
For your example with Jon, Abi, Joe, you would need three rows for relations: one from Jon to a family node, one from Abi to the same family node, and one from said family node to Joe.

See e.g. this sample spreadsheet.

The above spreadsheet may be imported using the following Excel import settings

and

 

Additionally, you will also need an appropriate properties mapper configuration that assigns each node a style that is recognized by the family layout algorithm. To create such a configuration, use the following approach:

  1. Create a user-defined palette section. See section Palette Manager in the yEd Manual for related documentation.
  2. Open the family tree sample diagram from "Help" -> "Example Graphs" -> "Layout" -> "familytree.graphmlz".
  3. Add one male node, one female node, and one family node to the palette section you create in step 1. (It does not matter which nodes you pick, you just require one node of each type.) A node can be added to a palette section by right-clicking the node to open its context menu and choosing "Add to Palette".
  4. Either import your spreadsheet once without specifying a properties mapper configuration or create a (temporary) custom property named "Type" with type "Text". Custom properties may be created with "Edit" -> "Manage Custom Properties".
  5. Create an appropriate properties mapper configuration (see "Edit" -> "Properties Mapper"):
    The "Type to Width" and "Type to Height" mappings have only one entry for "family". A good value for the width and height is e.g. 10.

Run the family tree layout algorithm after importing your spreadsheet.

by [yWorks] (133k points)
edited by
Fail to reproduce the example
Legal Disclosure | Privacy Policy
...