This class implements a layout algorithm for genealogical data (family trees).

Namespace: yWorks.yFiles.Layout.Genealogy
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version:


public class FamilyTreeLayouter : CanonicMultiStageLayouter
Visual Basic
Public Class FamilyTreeLayouter _ Inherits CanonicMultiStageLayouter


This class implements a layout algorithm for genealogical data (family trees).

To be suitable for this layouter the graphs have to be organized in the following way: Individuals as well as their marriage or partnership are represented by nodes, in the following referred to as INDI nodes for individuals and FAM nodes for family nodes, corresponding to the INDI and FAM entries in Gedcom encoded genealogical data (GEDCOM is a widely used format to store genealogical data, see for the most recent specifications).

In order to determine whether a node represents an individual or a partnership, the data provider DpKeyFamilyType has to be registered, otherwise an ArgumentException will be thrown. That data provider should return:

  • TypeMale for a node representing a male individual.
  • TypeFemale for a node representing a female individual.
  • TypeFamily for a node representing a family.
All other values will be interpreted as if the node represents an individual.

A FAM node is linked to the INDI nodes representing husband and wife by ingoing edges and to INDI nodes representing the children by outgoing edges. Two nodes of the same type (INDI or FAM) which are linked directly together will cause a InvalidGraphStructureException exception. A FAM node with more than two parents will also cause a InvalidGraphStructureException exception.

The layout is calculated basically in two steps:
  • The families are laid out by the inner layouter in a compact way: INDI->FAM<-INDI->FAM<-INDI
  • The relation between these "family groups" and their children and other families are laid out by the top layouter
The top layouter can be accessed by TopLayouter and TopLayouter . By default, an IncrementalHierarchicLayouter is used.

Inheritance Hierarchy


See Also