Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Footer
  • MenuNew
  • Navbar
  • On This PageNew
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Button
  • Checkbox
  • Color Picker
    • Date
    • Date Range
    • Datetime
    • Datetime Range
    • Time
    • Time Range
  • File Upload
  • NumericNew
  • Radio Button
  • RatingNew
  • Select
  • Slider
  • Switch
  • Textfield
  • Alert
  • Avatar
  • Chip
  • Icon
  • Progress
  • Skeleton
  • Spinner
  • TooltipNew
  • Data Table
  • Pagination
  • Pick List
  • BarcodeNew
  • QR CodeNew
  • CalendarNew
  • Table
  • Overview
  • Area
  • Bar
  • Box Plot
  • Bullet
  • Bump
  • Candlestick
  • Column
  • Dot Plot
  • Dumbbell
  • Funnel
  • Gantt
  • Gauge
  • Heatmap
  • Histogram
  • Icon
  • Line
  • Lollipop
  • Matrix
  • Nightingale
  • Parallel Coordinates
  • Pie
  • Quadrant
  • Radar
  • Radial Bar
  • Range
  • Scatter
  • Slope
  • Small Multiples
  • Strip Plot
  • Treemap
  • Waffle
  • Waterfall
  • Arc Diagram
  • Barcode
  • Beeswarm
  • Bump Area
  • Categorical Scatter
  • Chord Diagram
  • Circular Treemap
  • Contour
  • Convex Treemap
  • Density Plot
  • Dendrogram
  • Euler Diagram
  • Flowchart
  • Hexagonal Binning
  • Horizon
  • Marimekko
  • Network Diagram
  • Radial Histogram
  • Ridgeline
  • Sankey
  • Stream Graph
  • Sunburst
  • Venn Diagram
  • Violin Plot
  • Word Cloud
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Charts

TwGanttChart

TwGanttChart is a Blazor Gantt chart: a horizontal bar per task from its start date to its end date, showing a schedule and overlaps.

Last updated 18 October 2026

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

TwGanttChart draws a bar per ChartTask from its start date to its end date, in the order given, so the schedule and any overlaps are visible.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchStart 5 JanEnd 23 Jan
DesignStart 19 JanEnd 13 Feb
BuildStart 9 FebEnd 20 Mar
TestStart 9 MarEnd 31 Mar
5 Jan26 Jan16 Feb9 Mar31 Mar
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" />
</TwChart>
CSHARP
@code {
    private readonly ChartTask[] _tasks =
    [
        new("Research", new DateTime(2026, 1, 5, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 23, 0, 0, 0, DateTimeKind.Local)),
        new("Design", new DateTime(2026, 1, 19, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 13, 0, 0, 0, DateTimeKind.Local)),
        new("Build", new DateTime(2026, 2, 9, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 20, 0, 0, 0, DateTimeKind.Local)),
        new("Test", new DateTime(2026, 3, 9, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 31, 0, 0, 0, DateTimeKind.Local))
    ];
}

Date format

DateFormat takes any .NET date format string and applies to the axis, tooltips and table view.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchStart Jan 2026End Jan 2026
DesignStart Jan 2026End Feb 2026
BuildStart Feb 2026End Mar 2026
TestStart Mar 2026End Mar 2026
Jan 2026Jan 2026Feb 2026Mar 2026Mar 2026
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" DateFormat="MMM yyyy" />
</TwChart>

Labels

StartLabel, EndLabel and LabelHeader rename the values in tooltips and the table view.
Release plan
ResearchDesignBuildTest
ResearchDesignBuildTest
ResearchBegins 5 JanDue 23 Jan
DesignBegins 19 JanDue 13 Feb
BuildBegins 9 FebDue 20 Mar
TestBegins 9 MarDue 31 Mar
5 Jan26 Jan16 Feb9 Mar31 Mar
RAZOR
<TwChart Title="Release plan">
    <TwGanttChart Tasks="@_tasks" StartLabel="Begins" EndLabel="Due" LabelHeader="Phase" Height="ChartHeight.Small" />
</TwChart>

Summary

Tooltips and the table view give the start and end of each task.

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
  • Date format
  • Labels
  • Summary
  • Shared features
  • Keyboard navigation
Discord (opens in a new tab) • GitHub (opens in a new tab) • Documentation (opens in a new tab) • MIT License (opens in a new tab) • llms.txt (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload