documentationfor yFiles for HTML 2.6

FamilyTreeLayout

This layout algorithm arranges genealogical graphs (family trees).

Inheritance Hierarchy
MultiStageLayout
FamilyTreeLayout
Implemented Interfaces

Remarks

Layout Style

The family trees consist of nodes that represent individuals and nodes that represent families. Individuals are connected via these family nodes. The graph is arranged in layers that describe generations.

Basic Family Tree

Concept

In order to determine whether a node represents an individual or a partnership, a IDataProvider has to be registered with key FAMILY_TYPE_DP_KEY. If this IDataProvider is missing, an ArgumentError will be thrown.

This IDataProvider provides:

  • MALE for a node representing a male individual.
  • FEMALE for a node representing a female individual.
  • FAMILY for a node representing a family.

All other values will be interpreted as if the node represents an individual.

A FAMILY node links all members of a family. It can only have two incoming edges from the parents. Two nodes of the same type (families or individuals) cannot be directly connected. If the input graph violates these specifications, a InvalidGraphStructureError exception will be thrown.

The layout is calculated basically in two steps:

  • The families are laid out by the inner layouter in a compact way.
  • The relations between these "family groups" and their children and other families are laid out by the top layout algorithm.

Features

The distances between nodes in the same generation as well as between individuals and family nodes can be adjusted.

Nodes in the same generation can be aligned at three different coordinates: top, center, bottom.

The location of FAMILY nodes can be specified in relation to the partners. This placement can be set independently for parents.

Default Values of Properties

alignmentCENTER
familyMembersSortingPolicyNO_SORTING
familyNodesAlwaysBelowfalse nodes are placed between the partners.
hideGroupsStageEnabledfalseThe stage responsible for hiding group nodes is activated.
offsetForFamilyNodes10
parallelEdgeRouterEnabledtrueThe stage that routes parallel edges is activated.
partnerlessBelowtrue nodes are placed below single parents.
selfLoopRouterEnabledtrueThe stage that routes self-loops is activated.
spacingBetweenFamilyMembers30
topLayoutHierarchicLayout

Type Details

yfiles module
layout-familytree
yfiles-umd modules
layout-familytree, layout
Legacy UMD name
yfiles.genealogy.FamilyTreeLayout

See Also

Constructors

Properties

Methods

Constants