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

TwBarcodeChart

TwBarcodeChart is a Blazor barcode chart that draws a thin line for every raw observation along one axis, so clusters and gaps stand out.

Last updated 23 October 2026

Basic usage

TwBarcodeChart draws a thin vertical line for every value in Values along a single horizontal axis. Clusters show as dense stripes and gaps as white space, without the values being grouped into ranges first.
Response timesMilliseconds
112Count 1
118Count 1
121Count 1
123Count 1
127Count 1
131Count 1
135Count 1
138Count 1
142Count 1
144Count 1
149Count 1
151Count 1
153Count 1
168Count 1
190Count 1
245Count 1
290Count 1
100150200250300
RAZOR
<TwChart Title="Response times" Description="Milliseconds">
    <TwBarcodeChart Values="@_responseTimes" Height="ChartHeight.Small" />
</TwChart>
CSHARP
@code {
    private readonly double[] _responseTimes = [112, 118, 121, 123, 127, 131, 135, 138, 142, 144, 149, 151, 153, 168, 190, 245, 290];
}

Clusters and gaps

Two tight groups with nothing between them is a pattern a histogram can blur if a bin happens to straddle the gap. On a barcode chart it is unmistakable.
Eruption lengthMinutes
1.7 minEruptions 1
1.8 minEruptions 2
1.9 minEruptions 2
2.0 minEruptions 2
2.1 minEruptions 1
2.2 minEruptions 1
2.3 minEruptions 1
2.4 minEruptions 1
3.6 minEruptions 1
3.8 minEruptions 1
3.9 minEruptions 1
4.0 minEruptions 1
4.1 minEruptions 2
4.2 minEruptions 1
4.3 minEruptions 2
4.4 minEruptions 1
4.5 minEruptions 2
4.6 minEruptions 1
4.7 minEruptions 1
4.8 minEruptions 1
4.9 minEruptions 1
5.0 minEruptions 1
1.0 min2.0 min3.0 min4.0 min5.0 min
RAZOR
<TwChart Title="Eruption length" Description="Minutes">
    <TwBarcodeChart Values="@_eruptions" ValueFormat="0.0 min" ValueLabel="Length" CountLabel="Eruptions" Height="ChartHeight.Small" />
</TwChart>
CSHARP
@code {
    private readonly double[] _eruptions =
    [
        1.7, 1.8, 1.8, 1.9, 1.9, 2.0, 2.0, 2.1, 2.2, 2.3, 2.4, 3.6, 3.8, 3.9, 4.0, 4.1, 4.1, 4.2, 4.3, 4.3,
        4.4, 4.5, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0
    ];
}

Repeated values

Values that repeat share one line, and its tooltip and table row give how many observations it stands for. Use ValueLabel and CountLabel to name the two columns.
Order sizesItems per order
1Orders 6
2Orders 4
3Orders 3
4Orders 2
5Orders 1
6Orders 2
8Orders 1
12Orders 2
24Orders 1
0510152025
RAZOR
<TwChart Title="Order sizes" Description="Items per order">
    <TwBarcodeChart Values="@_orderSizes" ValueLabel="Items" CountLabel="Orders" Height="ChartHeight.Small" />
</TwChart>
CSHARP
@code {
    private readonly double[] _orderSizes = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 6, 8, 12, 12, 24];
}

When to use

A barcode chart suits a few dozen to a few hundred observations. Beyond that the lines merge, and TwHistogramChart or TwDensityPlotChart is the better choice.

Summary

Tooltips and the table view give each value and the count of observations that share it. The arrow keys step through the values from lowest to highest.

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
  • Clusters and gaps
  • Repeated values
  • When to use
  • 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