Charts
TwHistogramChart
TwHistogramChart is a Blazor histogram that groups raw values into equal-width bins to reveal the shape of a distribution.
Last updated
Please be aware this component is new, may have bugs and/or be subject to change. Please report any bugs at
https://github.com/twblazor/twblazor/issues.
Basic usage
TwHistogramChart takes raw Values, groups them into equal-width bins and draws a column per bin showing how many values fall in it. You pass the observations; the chart does the counting.Bin count
The number of bins follows Sturges' rule unless you set
BinCount. Fewer bins show the overall shape; more show detail.RAZOR
<TwChart Title="Response times">
<TwHistogramChart Values="@_responseTimes" BinCount="12" />
</TwChart>Labels
RangeLabel and CountLabel name the two columns of the table view, and CountLabel also titles the axis.RAZOR
<TwChart Title="Response times">
<TwHistogramChart Values="@_responseTimes" BinCount="6" RangeLabel="Milliseconds" CountLabel="Requests" Height="ChartHeight.Small" />
</TwChart>Summary
Tooltips and the table view give the range and count of each bin.