PartitionLayout Class

Lays a tree out as adjacent rectangles, one layer per depth, as d3's partition: an icicle chart, or a sunburst once mapped to polar coordinates. The width of a node is proportional to its value.

public sealed class PartitionLayout

Constructors

NameDescription
PartitionLayout()

PartitionLayout()

PartitionLayout.cs
public PartitionLayout()

No documentation is available.

Properties

NameDescription
HeightGets or sets the size of the layout along the depth (the height of an icicle). The default is 1.
PaddingGets or sets the space removed from the right and bottom edges of each rectangle, to separate them. The default is 0.
WidthGets or sets the size of the layout along the values (the width of an icicle). The default is 1.

Gets or sets the size of the layout along the depth (the height of an icicle). The default is 1.

public double Height { get; set; }

Property value

double

Gets or sets the space removed from the right and bottom edges of each rectangle, to separate them. The default is 0.

public double Padding { get; set; }

Property value

double

Gets or sets the size of the layout along the values (the width of an icicle). 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>)

PartitionLayout.cs

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

public IReadOnlyList<HierarchyRectangle<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<HierarchyRectangle<T>> The rectangle of every node, in pre-order. The root takes the first layer.