Class BOBTreemapChart<TY>
- Namespace
- BlazOrbit.Charts.Components
- Assembly
- BlazOrbit.Charts.dll
Hierarchical treemap - subdivides the chart area into nested rectangles whose size is proportional to each node's value. Uses the squarified algorithm (Bruls / Huijing / van Wijk, 2000) so rectangles stay close to square, making adjacent magnitudes easier to compare than the long thin strips of the classic slice-and-dice approach.
public sealed class BOBTreemapChart<TY> : BOBChartBase<object, TY>, IDataVisualizationFamilyComponent
Type Parameters
TYNumeric type of the node values.
- Inheritance
-
objectComponentBaseBOBChartBase<object, TY>BOBTreemapChart<TY>
- Implements
- Inherited Members
Constructors
BOBTreemapChart()
public BOBTreemapChart()
Properties
MinLabelSize
Minimum width / height (in pixels) a cell must reach before its label is drawn. Smaller cells skip the label to avoid visual clutter. Default 32.
[Parameter]
public double MinLabelSize { get; set; }
Property Value
- double
Nodes
Hierarchical dataset rendered into nested rectangles.
[Parameter]
public IEnumerable<BOBChartTreemapNode<TY>>? Nodes { get; set; }
Property Value
- IEnumerable<BOBChartTreemapNode<TY>>
OnNodeClick
Fired when the user clicks any cell (leaf or branch). Carries the node, its root-to-self path and its depth in the tree.
[Parameter]
public EventCallback<BOBChartTreemapClickArgs<TY>> OnNodeClick { get; set; }
Property Value
- EventCallback<BOBChartTreemapClickArgs<TY>>
Padding
Pixel padding inside each branch rect so child rectangles don't bleed into the parent's border. Default 2.
[Parameter]
public double Padding { get; set; }
Property Value
- double
Methods
BuildAriaLabel()
Default ARIA label for the chart's <svg> root. Subclasses
override to inject series / value summaries (improves screen-reader
experience).
protected override string BuildAriaLabel()
Returns
- string
RenderSvg(RenderTreeBuilder)
Concrete charts override this to emit SVG content. The supplied
builder is positioned inside the <svg> root, so
implementations only need to add geometry primitives (lines, paths,
rects, text). Sequence numbers must remain unique within the override.
protected override void RenderSvg(RenderTreeBuilder builder)
Parameters
builderRenderTreeBuilderRender tree builder positioned inside the SVG root.