TreemapMark<T> Class

Draws a tree as a treemap (TreemapLayout): each leaf is a rectangle whose area is proportional to its value, inside the rectangles of its ancestors.

public sealed class TreemapMark<T> : HierarchyMark<T>

Type parameters

T
The type of the data of the nodes.
Inheritance
HierarchyMark<T> TreemapMark<T>

Constructors

NameDescription
TreemapMark(HierarchyNode<T>)Initializes a new instance of the TreemapMark<T> class.

TreemapMark(HierarchyNode<T>)

TreemapMark.cs

Initializes a new instance of the TreemapMark<T> class.

public TreemapMark(HierarchyNode<T> root)

Parameters

root HierarchyNode<T>
The root of the tree. Its values must be computed (HierarchyNode<T>.Sum).

Properties

NameDescription
PaddingInnerGets or sets the space between siblings. The default is 1.
PaddingOuterGets or sets the space between the edges of a group and its children. The default is 0.
PaddingTopGets or sets the space between the top edge of a group and its children, where the name of the group is drawn when it fits. The default is 0.
ShowValuesGets or sets a value that indicates whether the value of a leaf is drawn under its label. The default is true.
TilingGets or sets how the rectangle of a node is divided among its children. The default is TreemapTiling.Squarified.
ValueFormatGets or sets the function that formats the values drawn under the labels, or null for NumberFormats.Default.

PaddingInner

TreemapMark.cs

Gets or sets the space between siblings. The default is 1.

public double PaddingInner { get; set; }

Property value

double

PaddingOuter

TreemapMark.cs

Gets or sets the space between the edges of a group and its children. The default is 0.

public double PaddingOuter { get; set; }

Property value

double

PaddingTop

TreemapMark.cs

Gets or sets the space between the top edge of a group and its children, where the name of the group is drawn when it fits. The default is 0.

public double PaddingTop { get; set; }

Property value

double

ShowValues

TreemapMark.cs

Gets or sets a value that indicates whether the value of a leaf is drawn under its label. The default is true.

public bool ShowValues { get; set; }

Property value

bool

Gets or sets how the rectangle of a node is divided among its children. The default is TreemapTiling.Squarified.

public TreemapTiling Tiling { get; set; }

Property value

TreemapTiling

ValueFormat

TreemapMark.cs

Gets or sets the function that formats the values drawn under the labels, or null for NumberFormats.Default.

public Func<double, string>? ValueFormat { get; set; }

Property value

Func<double, string>?