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

TwCircularTreemapChart

TwCircularTreemapChart is a Blazor circle packing chart: a circle per leaf of a tree, sized by value and packed inside its parent's circle.

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

TwCircularTreemapChart takes a tree of ChartHierarchyNode values. Every leaf becomes a circle whose area follows its Value, packed inside a circle for its parent. Each top-level node has its own color and legend entry.
Storage by folderGigabytes
  • Documents
  • Media
DocumentsMediaReportsNotesImagesAudioVideo
Documents / ReportsValue 32Share 17%
Documents / NotesValue 18Share 9.6%
Documents / InvoicesValue 9Share 4.8%
Media / ImagesValue 45Share 23.9%
Media / AudioValue 20Share 10.6%
Media / VideoValue 64Share 34%
RAZOR
<TwChart Title="Storage by folder" Description="Gigabytes">
    <TwCircularTreemapChart Roots="@_folders" />
</TwChart>
CSHARP
@code {
    private readonly ChartHierarchyNode[] _folders =
    [
        new("Documents", Children: [new("Reports", 32), new("Notes", 18), new("Invoices", 9)]),
        new("Media", Children: [new("Images", 45), new("Audio", 20), new("Video", 64)])
    ];
}

Deeper trees

Nodes nest to any depth, and every level gets its own enclosing circle, so the grouping reads at a glance. A larger Height gives small circles room for their names.
Headcount by division, department and team
  • Product
  • Commercial
  • Operations
ProductProduct / EngineeringProduct / DesignCommercialCommercial / SalesCommercial / MarketingOperationsPlatformWebMobileInterfaceEnterpriseMid-market
Product / Engineering / PlatformPeople 24Share 16.1%
Product / Engineering / WebPeople 18Share 12.1%
Product / Engineering / MobilePeople 14Share 9.4%
Product / Engineering / DataPeople 9Share 6%
Product / Design / ResearchPeople 6Share 4%
Product / Design / InterfacePeople 11Share 7.4%
Commercial / Sales / EnterprisePeople 16Share 10.7%
Commercial / Sales / Mid-marketPeople 12Share 8.1%
Commercial / Sales / PartnersPeople 5Share 3.4%
Commercial / Marketing / BrandPeople 7Share 4.7%
Commercial / Marketing / GrowthPeople 10Share 6.7%
Operations / FinancePeople 8Share 5.4%
Operations / PeoplePeople 6Share 4%
Operations / LegalPeople 3Share 2%
RAZOR
<TwChart Title="Headcount by division, department and team">
    <TwCircularTreemapChart Roots="@_organisation" LabelHeader="Team" ValueHeader="People" Height="ChartHeight.Large" />
</TwChart>
CSHARP
@code {
    private readonly ChartHierarchyNode[] _organisation =
    [
        new("Product", Children:
        [
            new("Engineering", Children: [new("Platform", 24), new("Web", 18), new("Mobile", 14), new("Data", 9)]),
            new("Design", Children: [new("Research", 6), new("Interface", 11)])
        ]),
        new("Commercial", Children:
        [
            new("Sales", Children: [new("Enterprise", 16), new("Mid-market", 12), new("Partners", 5)]),
            new("Marketing", Children: [new("Brand", 7), new("Growth", 10)])
        ]),
        new("Operations", Children: [new("Finance", 8), new("People", 6), new("Legal", 3)])
    ];
}

A flat list

Without children every node is a leaf, and the chart becomes a packed bubble chart: one circle and one color per value.
Population of the largest citiesMillions
TokyoDelhiShanghaiDhakaCairoLagosLondon
TokyoPopulation 37.2Share 20.8%
DelhiPopulation 33.8Share 18.9%
ShanghaiPopulation 29.9Share 16.7%
DhakaPopulation 23.9Share 13.4%
CairoPopulation 22.6Share 12.6%
LagosPopulation 16.5Share 9.2%
LondonPopulation 9.7Share 5.4%
SydneyPopulation 5.2Share 2.9%
RAZOR
<TwChart Title="Population of the largest cities" Description="Millions">
    <TwCircularTreemapChart Roots="@_cities" LabelHeader="City" ValueHeader="Population" ValueFormat="0.0" ShowLegend="false" />
</TwChart>
CSHARP
@code {
    private readonly ChartHierarchyNode[] _cities =
    [
        new("Tokyo", 37.2), new("Delhi", 33.8), new("Shanghai", 29.9), new("Dhaka", 23.9),
        new("Cairo", 22.6), new("Lagos", 16.5), new("London", 9.7), new("Sydney", 5.2)
    ];
}

When to use

Circles leave gaps, so sizes are harder to compare than on TwConvexTreemapChart; in return the nesting is easier to see. A name too long for its circle is cut short. Nodes with no value are left out.

Summary

Tooltips and the table view give the path and the value of each leaf. Tooltips also give its share of the whole.

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
  • Deeper trees
  • A flat list
  • 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