Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Charts

TwHistogramChart

TwHistogramChart is a Blazor histogram that groups raw values into equal-width bins to reveal the shape of a distribution.

Last updated 23 October 2026

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.
Response timesMilliseconds
Count
051015
051015
112 to 141.67Count 5
141.67 to 171.33Count 11
171.33 to 201Count 6
201 to 230.67Count 3
230.67 to 260.33Count 1
260.33 to 290Count 2
112141.67171.33201230.67260.33290
RAZOR
<TwChart Title="Response times" Description="Milliseconds">
    <TwHistogramChart Values="@_responseTimes" />
</TwChart>
CSHARP
@code {
    private readonly double[] _responseTimes =
    [
        112, 120, 131, 135, 138, 142, 144, 149, 151, 153, 156, 158, 160, 163, 167,
        170, 172, 176, 181, 185, 190, 196, 204, 215, 228, 240, 262, 290
    ];
}

Bin count

The number of bins follows Sturges' rule unless you set BinCount. Fewer bins show the overall shape; more show detail.
Response times
Count
0246
0246
112 to 126.83Count 2
126.83 to 141.67Count 3
141.67 to 156.5Count 6
156.5 to 171.33Count 5
171.33 to 186.17Count 4
186.17 to 201Count 2
201 to 215.83Count 2
215.83 to 230.67Count 1
230.67 to 245.5Count 1
245.5 to 260.33Count 0
260.33 to 275.17Count 1
275.17 to 290Count 1
112141.67171.33201230.67260.33290
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.
Response times
Requests
051015
051015
112 to 141.67Requests 5
141.67 to 171.33Requests 11
171.33 to 201Requests 6
201 to 230.67Requests 3
230.67 to 260.33Requests 1
260.33 to 290Requests 2
112141.67171.33201230.67260.33290
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.

Shared features

The legend, tooltips, keyboard navigation, table view, value formatting, height and empty state work the same on every chart. See TwChart for those options.

Keyboard navigation

The plot is a single Tab stop. Each data point is announced with its series and value as focus reaches it, and the table view presents the same data without the plot.
Key What it does
Tab Moves focus into the plot, onto the data point last visited.
Arrow Right or Arrow Down Moves to the next data point.
Arrow Left or Arrow Up Moves to the previous data point.
Home or End Moves to the first or last data point.
Escape Hides the tooltip of the focused data point.
Enter or Space On a legend item: shows or hides that series. On the table button: switches between the chart and its data table.

On this page

  • Basic usage
  • Bin count
  • Labels
  • Summary
  • Shared features
  • Keyboard navigation
twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload