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

TwHorizonChart

TwHorizonChart is a Blazor horizon chart that folds each series into a compact row of layered bands, fitting many series into little height.

Last updated 23 October 2026

Basic usage

TwHorizonChart gives each series its own short row. Values are cut into bands and the bands are layered, so a strong value shows as a darker color instead of a taller mark. Series are named on the axis.
Requests by serviceThousands per hour
APIWebSearchReports
APIWebSearchReports
00API 12Web 9Search 3Reports 1
02API 8Web 5Search 2Reports 1
04API 6Web 4Search 1Reports 22
06API 14Web 11Search 4Reports 18
08API 38Web 26Search 12Reports 3
10API 52Web 31Search 19Reports 2
12API 47Web 35Search 22Reports 2
14API 55Web 33Search 18Reports 3
16API 49Web 30Search 15Reports 2
18API 36Web 28Search 11Reports 1
20API 24Web 21Search 8Reports 1
22API 15Web 12Search 4Reports 1
000204060810121416182022
RAZOR
<TwChart Title="Requests by service" Description="Thousands per hour">
    <TwHorizonChart Categories="@_hours" Series="@_services" />
</TwChart>
CSHARP
@code {
    private readonly string[] _hours = ["00", "02", "04", "06", "08", "10", "12", "14", "16", "18", "20", "22"];
    
    private readonly ChartSeries[] _services =
    [
        new("API", [12, 8, 6, 14, 38, 52, 47, 55, 49, 36, 24, 15]),
        new("Web", [9, 5, 4, 11, 26, 31, 35, 33, 30, 28, 21, 12]),
        new("Search", [3, 2, 1, 4, 12, 19, 22, 18, 15, 11, 8, 4]),
        new("Reports", [1, 1, 22, 18, 3, 2, 2, 3, 2, 1, 1, 1])
    ];
}

Bands

BandCount sets how many bands the values are cut into, from 1 to 6. More bands show finer differences in the same height but are harder to tell apart; three is a good default.
Requests by serviceFive bands
APIWebSearchReports
APIWebSearchReports
00API 12Web 9Search 3Reports 1
02API 8Web 5Search 2Reports 1
04API 6Web 4Search 1Reports 22
06API 14Web 11Search 4Reports 18
08API 38Web 26Search 12Reports 3
10API 52Web 31Search 19Reports 2
12API 47Web 35Search 22Reports 2
14API 55Web 33Search 18Reports 3
16API 49Web 30Search 15Reports 2
18API 36Web 28Search 11Reports 1
20API 24Web 21Search 8Reports 1
22API 15Web 12Search 4Reports 1
000204060810121416182022
RAZOR
<TwChart Title="Requests by service" Description="Five bands">
    <TwHorizonChart Categories="@_hours" Series="@_services" BandCount="5" CategoryHeader="Hour" />
</TwChart>

Above and below zero

Negative values are drawn in the color for an unfavourable change, growing from the same baseline, so a row shows at a glance when a series was up and when it was down.
Change in sales against last yearPercent, by week
NorthSouthWest
NorthSouthWest
W1North +2.1South -1.4West +0.4
W2North +3.4South -2.2West +0.9
W3North +1.2South -3.1West +1.6
W4North -0.8South -1.9West +2.2
W5North -2.6South +0.6West +2.9
W6North -1.1South +2.4West +1.4
W7North +1.9South +3.3West -0.3
W8North +4.2South +2.8West -1.7
W1W2W3W4W5W6W7W8
RAZOR
<TwChart Title="Change in sales against last year" Description="Percent, by week">
    <TwHorizonChart Categories="@_weeks" Series="@_regions" ValueFormat="+0.0;-0.0" Height="ChartHeight.Small" />
</TwChart>
CSHARP
@code {
    private readonly string[] _weeks = ["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8"];
    
    private readonly ChartSeries[] _regions =
    [
        new("North", [2.1, 3.4, 1.2, -0.8, -2.6, -1.1, 1.9, 4.2]),
        new("South", [-1.4, -2.2, -3.1, -1.9, 0.6, 2.4, 3.3, 2.8]),
        new("West", [0.4, 0.9, 1.6, 2.2, 2.9, 1.4, -0.3, -1.7])
    ];
}

When to use

Use a horizon chart to fit many series into little height. Every row shares one scale, so the same darkness means the same magnitude in each. For a few series, TwLineChart is easier to read.

Summary

Tooltips and the table view give the value of every series for each category.

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
  • Bands
  • Above and below zero
  • 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