Skip to content
daisyBlazor

ChordChart

Relations between named nodes around a circle: each node is an arc as long as its total, each relation a ribbon between two arcs, such as calls between services or customers moving between plans. D3 places the arcs and ribbons; the chart draws them in theme colours.
Hierarchy and networks
Cover · <ChordChart>
Chord diagramGateway and Auth: 42; Gateway and Projects: 35; Gateway and Search: 18; Projects and Storage: 27; Projects and Auth: 12; Search and Storage: 9Gateway – Auth: 42Gateway – Projects: 35Gateway – Search: 18Auth – Projects: 12Projects – Storage: 27Search – Storage: 9Gateway: 95 GatewayAuth: 54 AuthProjects: 74 ProjectsSearch: 27 SearchStorage: 36 Storage

Examples

Basic

Each GraphLink joins Source and Target with a Value; node names come from the links, and a link counts once on each of its nodes.

Calls between services (millions per day)
Calls between services (millions per day)Gateway and Auth: 42; Gateway and Projects: 35; Gateway and Search: 18; Projects and Storage: 27; Projects and Auth: 12; Search and Storage: 9; Deployments and Storage: 14; Deployments and Projects: 11; Notifications and Auth: 6; Deployments and Notifications: 8Gateway – Auth: 42Gateway – Projects: 35Gateway – Search: 18Auth – Projects: 12Auth – Notifications: 6Projects – Storage: 27Projects – Deployments: 11Search – Storage: 9Storage – Deployments: 14Deployments – Notifications: 8Gateway: 95 GatewayAuth: 60 AuthProjects: 85 ProjectsSearch: 27 SearchStorage: 50 StorageDeployments: 33 DeploymentsNotifications: 14 Notifications
website/Examples/Charts/ChordChartBasicExample.razor Source

Directed

Directed="true" draws each ribbon as an arrow from Source to Target; ShowValues prints each node's total and NodeColors maps a node to any CSS colour.

Plan changes last quarter (customers)
Plan changes last quarter (customers)Free to Starter: 420; Free to Pro: 90; Starter to Pro: 260; Starter to Free: 110; Pro to Enterprise: 45; Pro to Starter: 70; Enterprise to Pro: 8Free → Starter: 420Free → Pro: 90Starter → Free: 110Starter → Pro: 260Pro → Starter: 70Pro → Enterprise: 45Enterprise → Pro: 8Free: 620 Free 620Starter: 860 Starter 860Pro: 473 Pro 473Enterprise: 53 Enterprise 53
website/Examples/Charts/ChordChartDirectedExample.razor Source

Playground

Calls between services (millions per day)
Calls between services (millions per day)Gateway and Auth: 42; Gateway and Projects: 35; Gateway and Search: 18; Projects and Storage: 27; Projects and Auth: 12; Search and Storage: 9; Deployments and Storage: 14; Deployments and Projects: 11; Notifications and Auth: 6; Deployments and Notifications: 8Gateway – Auth: 42Gateway – Projects: 35Gateway – Search: 18Auth – Projects: 12Auth – Notifications: 6Projects – Storage: 27Projects – Deployments: 11Search – Storage: 9Storage – Deployments: 14Deployments – Notifications: 8Gateway: 95 GatewayAuth: 60 AuthProjects: 85 ProjectsSearch: 27 SearchStorage: 50 StorageDeployments: 33 DeploymentsNotifications: 14 Notifications
<ChordChart
            Title="Calls between services (millions per day)"
            AspectRatio="1.4"
            Links="@_calls" />

@code {
    private readonly GraphLink[] _calls =
    [
        new("Gateway", "Auth", 42),
        new("Gateway", "Projects", 35),
        new("Gateway", "Search", 18),
        new("Projects", "Storage", 27),
        new("Projects", "Auth", 12),
        new("Search", "Storage", 9),
        new("Deployments", "Storage", 14),
        new("Deployments", "Projects", 11),
        new("Notifications", "Auth", 6),
        new("Deployments", "Notifications", 8),
    ];
}

API

<ChordChart>

DaisyBlazor.Charts

Parameters

  • AspectRatio double
    = 1.78

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

  • Directed bool
    = false

    When true, each ribbon is an arrow from Source to Target and a node's arc counts what it sends and receives; when false, a link is one two-way relation.

  • Links IReadOnlyList<GraphLink>
    = []

    The relations. Node names come from Source and Target; links to the same node or without a positive Value are skipped.

  • NodeColors IReadOnlyDictionary<string, string>
    = null

    Optional colour per node name (any CSS colour); other nodes cycle through the theme palette.

  • PadAngle double
    = 0.04

    Gap between neighbouring arcs, in radians.

  • 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
    = false

    Print each node's total after its name.

  • 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} calls".

  • 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