TreemapLayout Class
Lays a tree out as nested rectangles whose areas are proportional to the values of the nodes, as d3's treemap.
public sealed class TreemapLayoutConstructors
| Name | Description |
|---|---|
| TreemapLayout() |
TreemapLayout()
TreemapLayout.cspublic TreemapLayout()No documentation is available.
Properties
| Name | Description |
|---|---|
| Height | Gets or sets the height of the layout. The default is 1. |
| PaddingInner | Gets or sets the space between siblings. The default is 0. |
| PaddingOuter | Gets or sets the space between the edges of a node and its children. The default is 0. |
| PaddingTop | Gets or sets the space between the top edge of a node and its children, to make room for a label, or null for TreemapLayout.PaddingOuter. |
| Ratio | Gets or sets the target aspect ratio of TreemapTiling.Squarified. The default is the golden ratio. |
| Tiling | Gets or sets how the rectangle of a node is divided among its children. The default is TreemapTiling.Squarified. |
| Width | Gets or sets the width of the layout. The default is 1. |
Height
TreemapLayout.csPaddingInner
TreemapLayout.csPaddingOuter
TreemapLayout.csPaddingTop
TreemapLayout.csGets or sets the space between the top edge of a node and its children, to make room for a label, or null for TreemapLayout.PaddingOuter.
public double? PaddingTop { get; set; }Property value
Ratio
TreemapLayout.csGets or sets the target aspect ratio of TreemapTiling.Squarified. The default is the golden ratio.
public double Ratio { get; set; }Property value
Tiling
TreemapLayout.csGets 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
Width
TreemapLayout.csMethods
| Name | Description |
|---|---|
| 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>)
TreemapLayout.csPlaces 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
rootHierarchyNode<T>- The root of the tree.
Returns
IReadOnlyList<HierarchyRectangle<T>> The rectangle of every node, in pre-order.