Histogram Chart
BptChartHistogram
Histogram — bins a sequence of numeric values into adjacent rectangles. Switch the source distribution to see how the silhouette changes. Built on the BPT chart foundation — palette-aware, drag-to-rotate in 3D mode, scroll-zoom, and keyboard-accessible via a hidden data table.
Normal distribution (500 samples)| Bin | Count |
|---|
| [1.41, 10) | 3 |
| [10, 18.6) | 4 |
| [18.6, 27.2) | 24 |
| [27.2, 35.8) | 53 |
| [35.8, 44.4) | 95 |
| [44.4, 53) | 104 |
| [53, 61.6) | 96 |
| [61.6, 70.2) | 78 |
| [70.2, 78.8) | 30 |
| [78.8, 87.4) | 13 |
<BptChartHistogram Values="@Values"
Width="640"
Height="360"
XAxisLabel="Value"
YAxisLabel="Frequency"
Title="Normal distribution"
OnElementClick="HandleClick" />
@code {
// Histogram bins raw numeric values; no per-point record type.
private IReadOnlyList<double> Values = new double[]
{
// …500 normal samples (mean 50, σ 15)
};
private void HandleClick(BptChartElementEvent e) {
// Click handler — fires regardless of TooltipMode.
}
}