TreemapNode Class
A node of a treemap: a section, which groups other nodes, or a leaf, whose value gives its area. As in Mermaid, a node with a TreemapNode.Value is a leaf, and a node without one is a section.
public sealed class TreemapNodeConstructors
| Name | Description |
|---|---|
| TreemapNode(string, double?) | Initializes a new instance of the TreemapNode class. |
TreemapNode(string, double?)
TreemapNode.csInitializes a new instance of the TreemapNode class.
Properties
| Name | Description |
|---|---|
| Children | Gets the children of a section. In Mermaid, a leaf has no children. |
| CssClass | Gets or sets the name of the class of the node (Mermaid :::class), whose style is in TreemapChart.ClassDefinitions, or null for none. |
| Name | Gets or sets the name, drawn in the node. |
| Value | Gets or sets the value of a leaf, or null for a section, whose value is the sum of the values of its children. |
Children
TreemapNode.csGets the children of a section. In Mermaid, a leaf has no children.
public IList<TreemapNode> Children { get; }Property value
CssClass
TreemapNode.csGets or sets the name of the class of the node (Mermaid :::class), whose style is in TreemapChart.ClassDefinitions, or null for none.
public string? CssClass { get; set; }Property value
Name
TreemapNode.csValue
TreemapNode.csGets or sets the value of a leaf, or null for a section, whose value is the sum of the values of its children.
public double? Value { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- The value is negative, not finite or larger than 1E+300.
Methods
| Name | Description |
|---|---|
| AddChild(string, double?) | Adds a child. |
AddChild(string, double?)
TreemapNode.csAdds a child.
public TreemapNode AddChild(string name, double? value = null)Parameters
Returns
TreemapNode The child.
Exceptions
ArgumentOutOfRangeExceptionvalueis negative, not finite or larger than 1E+300.