Skip to content
daisyBlazor

FunnelChart

Stages that each keep part of the one before, such as trial to paid: every stage is as wide as its value and shows its conversion from the previous stage. D3 computes the outlines.
Composition and progress
Cover · <FunnelChart>
Funnel chartTrial: 2,150; Active: 1,320, 61.4% of previous, 61.4% of first; Team: 760, 57.6% of previous, 35.3% of first; Paid: 410, 53.9% of previous, 19.1% of firstTrial: 2,150 Trial 2,150Active: 1,320, 61.4% of previous, 61.4% of first Active 1,32061.4% of previousTeam: 760, 57.6% of previous, 35.3% of first Team 76057.6% of previousPaid: 410, 53.9% of previous, 19.1% of first Paid 41053.9% of previous

Examples

Basic

Data holds the stages as ChartDataPoint values, first to last; the right side shows each value and the share kept from the stage before.

Trial to paid, last 30 days
Trial to paid, last 30 daysPricing page: 8,400; Started trial: 2,150, 25.6% of previous, 25.6% of first; Activated: 1,320, 61.4% of previous, 15.7% of first; Invited team: 760, 57.6% of previous, 9% of first; Paid: 410, 53.9% of previous, 4.9% of firstPricing page: 8,400 Pricing page 8,400Started trial: 2,150, 25.6% of previous, 25.6% of first Started trial 2,15025.6% of previousActivated: 1,320, 61.4% of previous, 15.7% of first Activated 1,32061.4% of previousInvited team: 760, 57.6% of previous, 9% of first Invited team 76057.6% of previousPaid: 410, 53.9% of previous, 4.9% of first Paid 41053.9% of previous
website/Examples/Charts/FunnelChartBasicExample.razor Source

Pyramid

Shape="FunnelShape.Pyramid" cuts a triangle into slices whose heights follow the values, first stage at the base. Color="@null" gives each stage its own palette colour.

Pyramid chartAll workspaces: 5,200; Weekly active: 2,900, 55.8% of previous, 55.8% of first; Daily active: 1,100, 37.9% of previous, 21.2% of first; Power users: 240, 21.8% of previous, 4.6% of firstAll workspaces: 5,200 All workspaces 5,200Weekly active: 2,900, 55.8% of previous, 55.8% of first Weekly active 2,90055.8% of previousDaily active: 1,100, 37.9% of previous, 21.2% of first Daily active 1,10037.9% of previousPower users: 240, 21.8% of previous, 4.6% of first Power users 24021.8% of previous
website/Examples/Charts/FunnelChartPyramidExample.razor Source

Rectangle

Shape="FunnelShape.Rectangle" draws each stage as a centred rectangle as wide as its value, with no slanted sides.

Workspace onboarding
Workspace onboardingSigned up: 5,200; Created a project: 3,900, 75% of previous, 75% of first; Connected a repo: 2,450, 62.8% of previous, 47.1% of first; First deploy: 1,700, 69.4% of previous, 32.7% of first; Invited a teammate: 980, 57.6% of previous, 18.8% of firstSigned up: 5,200 Signed up 5,200Created a project: 3,900, 75% of previous, 75% of first Created a project 3,90075% of previousConnected a repo: 2,450, 62.8% of previous, 47.1% of first Connected a repo 2,45062.8% of previousFirst deploy: 1,700, 69.4% of previous, 32.7% of first First deploy 1,70069.4% of previousInvited a teammate: 980, 57.6% of previous, 18.8% of first Invited a teammate 98057.6% of previous
website/Examples/Charts/FunnelChartRectangleExample.razor Source

Playground

Trial to paid, last 30 days
Trial to paid, last 30 daysPricing page: 8,400; Started trial: 2,150, 25.6% of previous, 25.6% of first; Activated: 1,320, 61.4% of previous, 15.7% of first; Invited team: 760, 57.6% of previous, 9% of first; Paid: 410, 53.9% of previous, 4.9% of firstPricing page: 8,400 Pricing page 8,400Started trial: 2,150, 25.6% of previous, 25.6% of first Started trial 2,15025.6% of previousActivated: 1,320, 61.4% of previous, 15.7% of first Activated 1,32061.4% of previousInvited team: 760, 57.6% of previous, 9% of first Invited team 76057.6% of previousPaid: 410, 53.9% of previous, 4.9% of first Paid 41053.9% of previous
Shape FunnelShape
<FunnelChart
             ValueFormat="{0:N0}"
             Title="Trial to paid, last 30 days"
             Data="@_stages" />

@code {
    private readonly ChartDataPoint[] _stages =
    [
        new("Pricing page", 8_400),
        new("Started trial", 2_150),
        new("Activated", 1_320),
        new("Invited team", 760),
        new("Paid", 410),
    ];
}

API

<FunnelChart>

DaisyBlazor.Charts

Parameters

  • AspectRatio double
    = 1.78

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

  • Color string
    = "var(--color-primary)"

    Colour of every stage that has no Color of its own. When null, stages cycle through the theme palette.

  • Data IReadOnlyList<ChartDataPoint>
    = []

    The stages, first (widest) to last. Points without a finite, non-negative Value are skipped.

  • FirstFormat string
    = "{0} of first"

    Format string for a stage's share of the first stage in its tooltip; {0} is the percentage.

  • Gap double
    = 4

    Gap between stages, in chart units.

  • PreviousFormat string
    = "{0} of previous"

    Format string for a stage's conversion from the stage before, under its value and in its tooltip; {0} is the percentage.

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

  • Shape FunnelShape
    = FunnelShape.Funnel

    Funnel (equal-height stages narrowing top to bottom), Pyramid (a triangle sliced by value, first stage at the base) or Rectangle (equal-height centred rectangles as wide as their value).

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

  • Title string
    = null

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

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

    Format string for stage values, e.g. "{0:N0} accounts".

  • 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