Class BOBHistogramChart<T>
- Namespace
- BlazOrbit.Charts.Components
- Assembly
- BlazOrbit.Charts.dll
Histogram - distribution of a single numeric variable. Auto-bins the
raw Values using BinRule and renders each
bin as a vertical bar. Includes a quantile readout (Median,
P95) optionally shown via the ShowQuantileLines
flag.
public class BOBHistogramChart<T> : BOBChartBase<int, int>, IDataVisualizationFamilyComponent, IHasAxes where T : struct
Type Parameters
TNumeric value type (int, double, decimal, …).
- Inheritance
-
objectComponentBaseBOBHistogramChart<T>
- Implements
- Inherited Members
Constructors
BOBHistogramChart()
public BOBHistogramChart()
Properties
BinCount
Bin count when BinRule is FixedCount.
[Parameter]
public int BinCount { get; set; }
Property Value
- int
BinLabelFormat
Number-format used for bin label ranges. Default "G".
[Parameter]
public string? BinLabelFormat { get; set; }
Property Value
- string
BinRule
Binning rule. Default Sturges.
[Parameter]
public BOBHistogramBinRule BinRule { get; set; }
Property Value
Color
Optional fill color override; falls back to the active palette's first color.
[Parameter]
public string? Color { get; set; }
Property Value
- string
ShowQuantileLines
When true, draws vertical guide lines at the median and 95th
percentile of Values. Default false.
[Parameter]
public bool ShowQuantileLines { get; set; }
Property Value
- bool
Values
Raw observations to bin and plot. Repeated values increase a bin's count.
[Parameter]
public IEnumerable<T>? Values { get; set; }
Property Value
- IEnumerable<T>
XAxis
Configuration for the horizontal axis.
[Parameter]
public BOBChartAxis XAxis { get; set; }
Property Value
YAxis
Configuration for the vertical axis.
[Parameter]
public BOBChartAxis YAxis { get; set; }
Property Value
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.