TreeLayout Class

Lays a tree out as a tidy node-link diagram, as d3's tree: the Reingold–Tilford algorithm in the linear-time version of Buchheim, Jünger and Leipert (2002). The nodes of a depth are on a line, a parent is centered over its children, and subtrees are as compact as possible without overlapping. Siblings are 1 unit apart, cousins 2.

public sealed class TreeLayout

Constructors

NameDescription
TreeLayout()

TreeLayout()

TreeLayout.cs
public TreeLayout()

No documentation is available.

Properties

NameDescription
HeightGets or sets the size of the layout along the depths. The default is 1.
WidthGets or sets the size of the layout across the depths. The default is 1.

Gets or sets the size of the layout along the depths. The default is 1.

public double Height { get; set; }

Property value

double

Gets or sets the size of the layout across the depths. The default is 1.

public double Width { get; set; }

Property value

double

Methods

NameDescription
Layout<T>(HierarchyNode<T>)Places the nodes of a tree.

Layout<T>(HierarchyNode<T>)

TreeLayout.cs

Places the nodes of a tree.

public IReadOnlyList<HierarchyPoint<T>> Layout<T>(HierarchyNode<T> root)

Type parameters

T
The type of the data of the nodes.

Parameters

root HierarchyNode<T>
The root of the tree.

Returns

IReadOnlyList<HierarchyPoint<T>> The point of every node, in pre-order.