Class BOBHeatmapChart<TX, TY>
- Namespace
- BlazOrbit.Charts.Components
- Assembly
- BlazOrbit.Charts.dll
Heatmap - 2D matrix where each cell's intensity maps to a color in a sequential ramp between LowColor and HighColor. Useful for correlation matrices, calendar heatmaps (GitHub-style), hourly traffic, retention cohorts.
public sealed class BOBHeatmapChart<TX, TY> : BOBChartBase<TX, TY>, IDataVisualizationFamilyComponent where TX : notnull where TY : notnull
Type Parameters
TXColumn key (e.g. day, hour, bucket).
TYRow key (e.g. day-of-week, segment).
- Inheritance
-
objectComponentBaseBOBChartBase<TX, TY>BOBHeatmapChart<TX, TY>
- Implements
- Inherited Members
Constructors
BOBHeatmapChart()
public BOBHeatmapChart()
Properties
CellGap
Pixel gap between adjacent cells. Default 1.
[Parameter]
public double CellGap { get; set; }
Property Value
- double
Cells
Cells; each cell defines its column, row and intensity value.
[Parameter]
public IEnumerable<BOBChartHeatmapCell<TX, TY>>? Cells { get; set; }
Property Value
- IEnumerable<BOBChartHeatmapCell<TX, TY>>
Columns
Optional explicit column order; otherwise auto-derived from cells.
[Parameter]
public IEnumerable<TX>? Columns { get; set; }
Property Value
- IEnumerable<TX>
HighColor
Upper-bound color of the ramp (mapped to max cell value). Same theming conventions as LowColor.
[Parameter]
public string HighColor { get; set; }
Property Value
- string
LowColor
Lower-bound color of the ramp (mapped to min cell value). Defaults to a
theme-aware variable so the ramp shifts with the active palette; pass any valid
CSS color (literal or var(--palette-…)) to override.
[Parameter]
public string LowColor { get; set; }
Property Value
- string
Rows
Optional explicit row order; otherwise auto-derived from cells.
[Parameter]
public IEnumerable<TY>? Rows { get; set; }
Property Value
- IEnumerable<TY>
ShowValues
When true, the cell value is rendered as text inside the cell.
[Parameter]
public bool ShowValues { get; set; }
Property Value
- bool
ValueFormat
Format for cell-value text (when ShowValues is on).
[Parameter]
public string ValueFormat { get; set; }
Property Value
- string
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.