PackLayout Class

Lays a tree out as nested circles: the area of each leaf is proportional to its value, and the children of a node are packed in its circle, as d3's pack. The result is deterministic.

public sealed class PackLayout

Constructors

NameDescription
PackLayout()

PackLayout()

PackLayout.cs
public PackLayout()

No documentation is available.

Properties

NameDescription
HeightGets or sets the height of the layout. The default is 1.
PaddingGets or sets the space between sibling circles, and between a parent and its children. The default is 0.
WidthGets or sets the width of the layout. The default is 1.

Gets or sets the height of the layout. The default is 1.

public double Height { get; set; }

Property value

double

Gets or sets the space between sibling circles, and between a parent and its children. The default is 0.

public double Padding { get; set; }

Property value

double

Gets or sets the width of the layout. The default is 1.

public double Width { get; set; }

Property value

double

Methods

NameDescription
Layout<T>(HierarchyNode<T>)Places the nodes of a tree. The values of the nodes must be computed first (HierarchyNode<T>.Sum).

Layout<T>(HierarchyNode<T>)

PackLayout.cs

Places the nodes of a tree. The values of the nodes must be computed first (HierarchyNode<T>.Sum).

public IReadOnlyList<HierarchyCircle<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<HierarchyCircle<T>> The circle of every node, in pre-order.