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

TwScatterChart

TwScatterChart is a Blazor scatter plot that positions points by two values. Also draws bubble charts and connected scatter plots.

Last updated 23 October 2026

Basic usage

TwScatterChart positions points by two numeric values to show how they relate. Pass one or more ChartPointSeries, each a named list of ChartPoint. XTitle and YTitle label the axes and name the values in tooltips and the table view.
Price against rating
Rating
3.544.55
3.544.55
BudsPrice 49Rating 4.1
StudioPrice 129Rating 4.6
SportPrice 79Rating 3.8
PulsePrice 199Rating 4.4
BandPrice 99Rating 3.6
ProPrice 249Rating 4.7
050100150200250
Price
RAZOR
<TwChart Title="Price against rating">
    <TwScatterChart Series="@_products" XTitle="Price" YTitle="Rating" />
</TwChart>
CSHARP
@code {
    private readonly ChartPointSeries[] _products =
    [
        new("Audio", [new(49, 4.1, "Buds"), new(129, 4.6, "Studio"), new(79, 3.8, "Sport")]),
        new("Wearables", [new(199, 4.4, "Pulse"), new(99, 3.6, "Band"), new(249, 4.7, "Pro")])
    ];
}

Bubble chart

Give points a Size and each is drawn as a bubble whose area follows it, adding a third value. SizeTitle names it.
Price, rating and units sold
Rating
3.544.55
3.544.55
BudsPrice 49Rating 4.1Units sold 320
StudioPrice 129Rating 4.6Units sold 180
SportPrice 79Rating 3.8Units sold 240
PulsePrice 199Rating 4.4Units sold 150
BandPrice 99Rating 3.6Units sold 410
ProPrice 249Rating 4.7Units sold 90
050100150200250
Price
RAZOR
<TwChart Title="Price, rating and units sold">
    <TwScatterChart Series="@_bubbles" XTitle="Price" YTitle="Rating" SizeTitle="Units sold" />
</TwChart>
CSHARP
@code {
    private readonly ChartPointSeries[] _bubbles =
    [
        new("Audio", [new(49, 4.1, "Buds", 320), new(129, 4.6, "Studio", 180), new(79, 3.8, "Sport", 240)]),
        new("Wearables", [new(199, 4.4, "Pulse", 150), new(99, 3.6, "Band", 410), new(249, 4.7, "Pro", 90)])
    ];
}

Point labels

Set ShowLabels to print each point's Label beside it.
Price against rating
Rating
3.544.55
3.544.55
Buds
Studio
Sport
Pulse
Band
Pro
BudsPrice 49Rating 4.1
StudioPrice 129Rating 4.6
SportPrice 79Rating 3.8
PulsePrice 199Rating 4.4
BandPrice 99Rating 3.6
ProPrice 249Rating 4.7
050100150200250
Price
RAZOR
<TwChart Title="Price against rating">
    <TwScatterChart Series="@_products" XTitle="Price" YTitle="Rating" ShowLabels="true" />
</TwChart>

Connected scatter plot

Set Connect to join the points of each series in order, tracing a path through two variables over time.
Unemployment against inflationPercent, by year
Inflation
2468
2468
2021
2022
2023
2024
2025
2021Unemployment 4.1Inflation 2
2022Unemployment 3.8Inflation 6.2
2023Unemployment 4.3Inflation 7.4
2024Unemployment 4.6Inflation 3.1
2025Unemployment 4.4Inflation 2.4
3.63.844.24.44.6
Unemployment
RAZOR
<TwChart Title="Unemployment against inflation" Description="Percent, by year">
    <TwScatterChart Series="@_economy" XTitle="Unemployment" YTitle="Inflation" Connect="true" ShowLabels="true" />
</TwChart>
CSHARP
@code {
    private readonly ChartPointSeries[] _economy =
    [
        new("Economy", [new(4.1, 2.0, "2021"), new(3.8, 6.2, "2022"), new(4.3, 7.4, "2023"), new(4.6, 3.1, "2024"), new(4.4, 2.4, "2025")])
    ];
}

Colors

Any two points can sit side by side, so keep to three series or fewer for colors that stay easy to tell apart.

Summary

Tooltips and the table view give the X and Y values of each point, and its size when it has one.

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
  • Bubble chart
  • Point labels
  • Connected scatter plot
  • Colors
  • 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