Skip to content
daisyBlazor

IcicleChart

A tree as stacked bands, one band per level, each node as long as its value: storage by team and project, requests by region and service. D3 places the bands; the chart draws them in theme colours, one colour per top-level branch.
Hierarchy and networks
Cover · <IcicleChart>
StoragePlatform: 730; Product: 470; Data: 730Storage: 1,930StoragePlatform: 730PlatformData: 730DataProduct: 470ProductPlatform / Logs: 420LogsPlatform / Backups: 310BackupsData / Warehouse: 520WarehouseData / Snapshots: 210SnapshotsProduct / Uploads: 380UploadsProduct / Exports: 90

Examples

Basic

Root is a HierarchyNode; the root fills the first column and each level splits it further. Bands show their name and value when they fit.

Storage by team and project (GB)
Storage by team and project (GB)Platform: 850 GB; Product: 530 GB; Data: 730 GB; Support: 115 GBStorage: 2,225 GBStorage2,225 GBPlatform: 850 GBPlatform850 GBData: 730 GBData730 GBProduct: 530 GBProduct530 GBSupport: 115 GBSupportPlatform / Logs: 420 GBLogs420 GBPlatform / Backups: 310 GBBackups310 GBPlatform / Images: 120 GBImagesData / Warehouse: 520 GBWarehouse520 GBData / Snapshots: 210 GBSnapshots210 GBProduct / Uploads: 380 GBUploads380 GBProduct / Thumbnails: 90 GBProduct / Exports: 60 GBSupport / Attachments: 70 GBSupport / Recordings: 45 GB
website/Examples/Charts/IcicleChartBasicExample.razor Source

Vertical

Horizontal="false" puts the root on top with one row per level.

All requestsEurope: 1,290k; Americas: 960k; Asia: 400kAll requests: 2,650kAll requests2,650kEurope: 1,290kEurope1,290kAmericas: 960kAmericas960kAsia: 400kAsia400kEurope / API: 840kAPI840kEurope / Auth: 260kAuth260kEurope / Search: 190kSear…190kAmericas / API: 620kAPI620kAmericas / Auth: 210kAuth210kAmericas / Search: 130kAsia / API: 310kAPI310kAsia / Auth: 90k
website/Examples/Charts/IcicleChartVerticalExample.razor Source

Drill-down

Drilldown="true" with Focus="Europe" set up front: the chart starts on that branch. Click a band with children to drill further; the first band and the breadcrumb go back up. Clicks need an interactive render mode.

Acme Cloud API requests by region, service and endpoint (thousands)
Acme Cloud API requests by region, service and endpoint (thousands)Europe: 2,690k; Americas: 1,860k; Asia: 590kEurope: 2,690kEurope2,690kEurope / api: 1,770kapi1,770kEurope / auth: 660kauth660kEurope / webhooks: 260kwebhooks260kEurope / api / projects: 820kprojects820kEurope / api / tasks: 640ktasks640kEurope / api / search: 310ksearch310kEurope / auth / token: 540ktoken540kEurope / auth / sso: 120kEurope / webhooks / deliveries: 260kdeliveries260k

Focus: Europe

website/Examples/Charts/IcicleChartDrilldownExample.razor Source

Playground

Storage by team and project (GB)
Storage by team and project (GB)Platform: 850 GB; Product: 530 GB; Data: 730 GB; Support: 115 GBStorage: 2,225 GBStorage2,225 GBPlatform: 850 GBPlatform850 GBData: 730 GBData730 GBProduct: 530 GBProduct530 GBSupport: 115 GBPlatform / Logs: 420 GBLogs420 GBPlatform / Backups: 310 GBBackups310 GBPlatform / Images: 120 GBImagesData / Warehouse: 520 GBWarehouse520 GBData / Snapshots: 210 GBSnapshots210 GBProduct / Uploads: 380 GBUploads380 GBProduct / Thumbnails: 90 GBProduct / Exports: 60 GBSupport / Attachments: 70 GBSupport / Recordings: 45 GB
<IcicleChart
             ValueFormat="{0:N0} GB"
             Title="Storage by team and project (GB)"
             Root="@_storage" />

@code {
    private readonly HierarchyNode _storage = new("Storage", Children:
    [
        new("Platform", Children: [new("Logs", 420), new("Backups", 310), new("Images", 120)]),
        new("Product", Children: [new("Uploads", 380), new("Thumbnails", 90), new("Exports", 60)]),
        new("Data", Children: [new("Warehouse", 520), new("Snapshots", 210)]),
        new("Support", Children: [new("Attachments", 70), new("Recordings", 45)]),
    ]);
}

API

<IcicleChart>

DaisyBlazor.Charts

Parameters

  • AspectRatio double
    = 1.78

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

  • Drilldown bool
    = false

    Click (or Enter on) a node with children to show only that branch, at full size; a leaf below the first level opens its parent, so a treemap whose leaves cover their parents still drills. A breadcrumb above the chart goes back up. Needs an interactive render mode: under static rendering the chart shows Focus (or the whole tree) with no buttons.

  • Focus string
    = null

    The node drawn as the root, as the names below the root joined by '/', e.g. "Platform/Logs"; null for the whole tree. A '/' inside a name is written "\/" and a backslash "\\", so the node "A / B" under "CI/CD" is "CI\/CD/A \/ B" (FocusChanged reports paths the same way). Bind it with @bind-Focus to set or follow the drilled node. An unknown path shows the whole tree and a leaf shows its parent. Applies under static rendering too.

  • GroupColors IReadOnlyDictionary<string, string>
    = null

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

  • Horizontal bool
    = true

    Put the root on the left with one column per level (the default); false puts it on top with one row per level.

  • Root HierarchyNode
    = null

    The tree to draw. Leaves are sized by Value; a parent is the sum of its children. The root is the first band.

  • 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.

  • 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 node's value under its name when the band is tall 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} GB".

  • 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.

Events

  • FocusChanged EventCallback<string>

    Raised with the new Focus when a click or the breadcrumb moves it (interactive render modes only).

  • OnNodeClick EventCallback<HierarchyNode>

    Raised with the clicked node of Root, leaves included, when set; nodes become buttons even without Drilldown. Needs an interactive render mode.

Something went wrong while running the docs. Reload