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

TwAreaChart

TwAreaChart is a Blazor area chart: a line chart with the space beneath filled. Supports stacked areas and smooth or stepped curves.

Last updated 23 October 2026

Basic usage

TwAreaChart is a line chart with the space under each line filled with a light wash, which emphasises volume. The scale always includes zero so the filled area stays honest.
Monthly visitorsThousands
020406080
020406080
JanOrganic 42
FebOrganic 48
MarOrganic 55
AprOrganic 61
MayOrganic 58
JunOrganic 70
JanFebMarAprMayJun
RAZOR
<TwChart Title="Monthly visitors" Description="Thousands">
    <TwAreaChart Categories="@_months" Series="@_organic" />
</TwChart>
CSHARP
@code {
    private readonly string[] _months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"];
    
    private readonly ChartSeries[] _organic = [new("Organic", [42, 48, 55, 61, 58, 70])];
}

Stacked

Set Stacked to pile the series on top of each other, showing how they add up to a total over time. Missing and negative values count as zero when stacked.
Monthly visitors by channel
050100150200
050100150200
JanOrganic 42Paid 30Referral 12
FebOrganic 48Paid 34Referral 15
MarOrganic 55Paid 31Referral 21
AprOrganic 61Paid 45Referral 19
MayOrganic 58Paid 52Referral 26
JunOrganic 70Paid 49Referral 33
JanFebMarAprMayJun
RAZOR
<TwChart Title="Monthly visitors by channel">
    <TwAreaChart Categories="@_months" Series="@_visitors" Stacked="true" />
</TwChart>
CSHARP
@code {
    private readonly ChartSeries[] _visitors =
    [
        new("Organic", [42, 48, 55, 61, 58, 70]),
        new("Paid", [30, 34, 31, 45, 52, 49]),
        new("Referral", [12, 15, 21, 19, 26, 33])
    ];
}

Curves

Curve works as it does on a line chart: ChartCurve.Smooth for a spline area and ChartCurve.Step for a stepped one.
Monthly visitors
020406080
020406080
JanOrganic 42
FebOrganic 48
MarOrganic 55
AprOrganic 61
MayOrganic 58
JunOrganic 70
JanFebMarAprMayJun
RAZOR
<TwChart Title="Monthly visitors">
    <TwAreaChart Categories="@_months" Series="@_organic" Curve="ChartCurve.Smooth" />
</TwChart>

Overlapping series

Without stacking, the washes overlap so every line stays visible. Past two or three series, stack them or use TwSmallMultiplesChart instead.
Monthly visitors by channel
020406080
020406080
JanOrganic 42Paid 30Referral 12
FebOrganic 48Paid 34Referral 15
MarOrganic 55Paid 31Referral 21
AprOrganic 61Paid 45Referral 19
MayOrganic 58Paid 52Referral 26
JunOrganic 70Paid 49Referral 33
JanFebMarAprMayJun
RAZOR
<TwChart Title="Monthly visitors by channel">
    <TwAreaChart Categories="@_months" Series="@_visitors" />
</TwChart>

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
  • Stacked
  • Curves
  • Overlapping series
  • 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