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

TwVennDiagramChart

TwVennDiagramChart is a Blazor Venn diagram: up to three sets as equal overlapping circles, with the shared count where each pair meets.

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

TwVennDiagramChart draws each ChartSet as a circle and overlaps them all. A ChartSetIntersection names two sets and how many elements they share; that number is written where the two circles meet.
Skills on the teamPeople with each skill
ResearchDesignEngineering1469
ResearchSize 38Research ∩ Design 14Research ∩ Engineering 6
DesignSize 32Research ∩ Design 14Design ∩ Engineering 9
EngineeringSize 44Research ∩ Engineering 6Design ∩ Engineering 9
RAZOR
<TwChart Title="Skills on the team" Description="People with each skill">
    <TwVennDiagramChart Sets="@_skills" Intersections="@_sharedSkills" />
</TwChart>
CSHARP
@code {
    private readonly ChartSet[] _skills = [new("Research", 38), new("Design", 32), new("Engineering", 44)];
    
    private readonly ChartSetIntersection[] _sharedSkills =
    [
        new("Research", "Design", 14),
        new("Design", "Engineering", 9),
        new("Research", "Engineering", 6)
    ];
}

Two sets

With two sets the circles sit side by side. Intersections can name their sets in either order.
Newsletter and app usersThousands of customers
NewsletterApp40
NewsletterCustomers 120Newsletter ∩ App 40
AppCustomers 85Newsletter ∩ App 40
RAZOR
<TwChart Title="Newsletter and app users" Description="Thousands of customers">
    <TwVennDiagramChart Sets="@_audiences" Intersections="@_sharedAudience" LabelHeader="Audience" ValueHeader="Customers" Height="ChartHeight.Small" />
</TwChart>
CSHARP
@code {
    private readonly ChartSet[] _audiences = [new("Newsletter", 120), new("App", 85)];
    
    private readonly ChartSetIntersection[] _sharedAudience = [new("App", "Newsletter", 40)];
}

Missing overlaps

A Venn diagram always draws every possible overlap. A pair with no intersection given still overlaps on the plot but shows no number. To draw only the overlaps that exist, with circles sized by their sets, use TwEulerDiagramChart.
Features used last monthAccounts
ReportsExportsAlerts940310
ReportsSize 2,400Reports ∩ Exports 940Reports ∩ Alerts 310
ExportsSize 1,100Reports ∩ Exports 940
AlertsSize 860Reports ∩ Alerts 310
RAZOR
<TwChart Title="Features used last month" Description="Accounts">
    <TwVennDiagramChart Sets="@_features" Intersections="@_sharedFeatures" ValueFormat="#,0" />
</TwChart>
CSHARP
@code {
    private readonly ChartSet[] _features = [new("Reports", 2400), new("Exports", 1100), new("Alerts", 860)];
    
    private readonly ChartSetIntersection[] _sharedFeatures = [new("Reports", "Exports", 940), new("Reports", "Alerts", 310)];
}

When to use

Use a Venn diagram to show which sets overlap. The circles are all the same size, so read the numbers, not the areas. Up to three sets are drawn, and sets with no size are left out. To size the circles by their sets, use TwEulerDiagramChart.

Summary

Tooltips and the table view give the size of each set and of each overlap.

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
  • Two sets
  • Missing overlaps
  • When to use
  • 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