Skip to content
daisyBlazor

CirclePackingChart

A tree as nested circles, each leaf's area proportional to its value: deployments by team and service, projects by plan and region. D3 packs the circles; the chart draws them in theme colours, one colour per top-level branch, and names the leaves that are large enough.
Hierarchy and networks
Cover · <CirclePackingChart>
DeploymentsPlatform: 134; Product: 164; Data: 53Deployments: 351Product: 164Platform: 134Data: 53Product / Web app: 96Product / API: 41Product / Search: 27Platform / Gateway: 64Platform / Auth: 48Platform / Jobs: 22Data / Pipelines: 38Data / Exports: 15Web appAPIGatewayAuthJobsPipe…

Examples

Basic

Root is a HierarchyNode; each parent circle encloses its children, and the legend names the top-level branches.

Deployments this month by team and service
Deployments this month by team and servicePlatform: 152; Product: 164; Data: 62Deployments: 378Product: 164Platform: 152Data: 62Product / Web app: 96Product / Mobile API: 41Product / Search: 27Platform / Gateway: 64Platform / Auth: 48Platform / Scheduler: 22Platform / Billing: 18Data / Pipelines: 38Data / Warehouse: 15Data / Exports: 9Web app96Mobile API41Search27Gateway64Auth48Scheduler22Billing18Pipelines38Wareho…15Expo…
Product Platform Data
website/Examples/Charts/CirclePackingChartBasicExample.razor Source

Padding

Padding sets the gap between circles; ShowValues="false" keeps only the names, and the values stay in the tooltips.

ProjectsStarter: 1,880 projects; Pro: 920 projects; Enterprise: 300 projectsProjects: 3,100 projectsStarter: 1,880 projectsPro: 920 projectsEnterprise: 300 projectsStarter / Europe: 820 projectsStarter / Americas: 760 projectsStarter / Asia: 300 projectsPro / Europe: 410 projectsPro / Americas: 390 projectsPro / Asia: 120 projectsEnterprise / Americas: 160 projectsEnterprise / Europe: 140 projectsEuropeAmericasAsiaEuropeAmericasAsiaAmeri…Europe
Starter Pro Enterprise
website/Examples/Charts/CirclePackingChartPaddingExample.razor Source

Playground

Deployments this month by team and service
Deployments this month by team and servicePlatform: 152; Product: 164; Data: 62Deployments: 378Product: 164Platform: 152Data: 62Product / Web app: 96Product / Mobile API: 41Product / Search: 27Platform / Gateway: 64Platform / Auth: 48Platform / Scheduler: 22Platform / Billing: 18Data / Pipelines: 38Data / Warehouse: 15Data / Exports: 9Web app96Mobile API41Search27Gateway64Auth48Schedul…22Billing18Pipelines38Wareh…15Expo…
Product Platform Data
<CirclePackingChart
                    Title="Deployments this month by team and service"
                    AspectRatio="1.4"
                    Root="@_deployments" />

@code {
    private readonly HierarchyNode _deployments = new("Deployments", Children:
    [
        new("Platform", Children: [new("Gateway", 64), new("Auth", 48), new("Scheduler", 22), new("Billing", 18)]),
        new("Product", Children: [new("Web app", 96), new("Mobile API", 41), new("Search", 27)]),
        new("Data", Children: [new("Pipelines", 38), new("Warehouse", 15), new("Exports", 9)]),
    ]);
}

API

<CirclePackingChart>

DaisyBlazor.Charts

Parameters

  • AspectRatio double
    = 1.78

    Width divided by height. The chart keeps this shape at any width; its text keeps its size.

  • GroupColors IReadOnlyDictionary<string, string>
    = null

    Optional colour per top-level branch name (any CSS colour); other branches cycle through the theme palette.

  • Padding double
    = 3

    Gap between sibling circles and between a parent and its children, in chart units.

  • Root HierarchyNode
    = null

    The tree to draw. Leaves are sized by Value; a parent is the sum of its children and encloses them.

  • RowHeight double?
    = null

    Height of each row in px, for a chart that lays its categories out as rows (horizontal bars, a Gantt's lanes, a heatmap's rows…): its height then follows its number of rows instead of AspectRatio, so a long list keeps readable rows at any width. A chart, or an orientation, without rows ignores it.

  • ShowLegend bool
    = true

    Show a colour key for the top-level branches under the chart.

  • ShowTitle bool
    = true

    Draw Title as a visible heading above the chart (the default); false keeps it only as the chart's accessible name, for a chart inside a card that already has a heading.

  • ShowValues bool
    = true

    Print each leaf's value under its name when the circle is large enough.

  • Title string
    = null

    Optional heading rendered above the chart; it is also the chart's accessible name.

  • ValueFormat string
    = "{0:#,0.##}"

    Format string for values in labels and tooltips, e.g. "{0:N0} projects".

  • Width string
    = "100%"

    CSS width of the chart wrapper.

  • Class string
    = null

    Additional CSS classes merged onto the w-full wrapper.

  • Style string
    = null

    Inline styles appended after the width on the wrapper.

Something went wrong while running the docs. Reload