documentationfor yFiles for HTML 2.6

Family Tree Layout

Class FamilyTreeLayout is a special-purpose layout algorithm that provides genealogical tree layout for graphs that encode family trees. Family tree shows an example family tree.

Family tree

FamilyTreeLayout requires information about each of the nodes, namely whether a given node represents a person or a partnership of two persons, i.e., a family. To provide this information, use appropriately configured supplemental layout data.

Basic Options

Class FamilyTreeLayout uses different strategies for arranging the members of families, i.e., parents and children, on the one hand and then arranging these entire families on the other hand. The so-called top layout algorithm is responsible for the latter strategy, which by default is an incremental hierarchical layout algorithm. Using another layout algorithm for the top layout algorithm can be done by means of the following property:

topLayout: ILayoutAlgorithm
Determines the top layout algorithm.

Layout Data

When using class FamilyTreeLayout, supplemental layout data for a graph’s elements can be specified either by using class FamilyTreeLayoutData or by registering data providers with the graph using given look-up keys. Supplemental layout data lists all properties of FamilyTreeLayoutData and the corresponding look-up keys that FamilyTreeLayout tests during the layout process in order to query supplemental data.

Providing supplemental layout data is described in detail in Layout Data.

Supplemental layout data

familyTypes
For each node one of FAMILY, MALE, or FEMALE.
Data Provider Key: FAMILY_TYPE_DP_KEY
Maps from node to String