Skip to content
Multidimensional, network & hierarchyGenerated from the public API

ChordChart

Follow the relationship rather than the value — hover a mark to read its row.

@luc/ui/charts

What it shows

Show bidirectional cross-flows between labelled groups as ribbons around a shared ring.

Live preview

A square supplied matrix of cross-flows between four blocks, drawn as ribbons.

Arc length is the row plus column total for each group; each ribbon is one supplied matrix cell.
<ChordChart
  labels={["Equity", "Credit", "Rates", "Commodity"]}
  values={[[0, 42, 18, 9], [31, 0, 24, 6], [12, 27, 0, 11], [8, 5, 14, 0]]}
  format={{ kind: "integer" }}
  height={380}
  ariaLabel="Flow between blocks"
/>

Controls

Height

380px

A chart measures its container, so it always needs a definite height.

State

The surface the chart is in — loading, empty and error are drawn by the component.

Accessible name

A drawing is not readable by a screen reader, so it needs a name that states what it shows.

Arc length is the row plus column total for each group; each ribbon is one supplied matrix cell.

The same fixture as the live preview above; the controls change how it is drawn, not what it measures.

Code
import { ChordChart } from "@luc/ui/charts";

<ChordChart
  labels={["Equity", "Credit", "Rates", "Commodity"]}
  values={[[0, 42, 18, 9], [31, 0, 24, 6], [12, 27, 0, 11], [8, 5, 14, 0]]}
  format={{ kind: "integer" }}
  height={380}
  ariaLabel="Flow between blocks"
  state="ready"
/>

Not controllable here

  • series / rows — The numbers are the caller's; the fixture above is the example.
Copy for an AI agentA specification an agent can act on: the import, the setup, the chosen props, the data contract and the accessibility expectation.
Implement `ChordChart` from Luc UI. It is: Follow the relationship rather than the value — hover a mark to read its row.

Import it with: import { ChordChart } from "@luc/ui/charts";
Requires: react ^19.0.0; react-dom ^19.0.0; react-hook-form ^7.0.0 (optional, for @luc/ui/forms/react-hook-form); tailwindcss ^4.0.0; node >= 22 (repository tools). Import the stylesheet once at the app root and wrap the tree in `LucProvider`. Both come from the package that publishes @luc.

Chosen configuration: `height={380}`, `state="ready"`, `ariaLabel="Flow between blocks"`.

Accessibility: keep the component's own semantics. Do not re-implement its ARIA wiring, do not add roles it does not declare, and make sure every interactive element is reachable and operable from the keyboard with a visible focus state.
Styling: use Luc UI design tokens and the component's own props. Do not restyle with raw colour literals and do not override the component's internal structure with page CSS.
Motion: respect `prefers-reduced-motion`. The component already does, so do not disable it.

Reproduce this state:
```tsx
<ChordChart
  labels={["Equity", "Credit", "Rates", "Commodity"]}
  values={[[0, 42, 18, 9], [31, 0, 24, 6], [12, 27, 0, 11], [8, 5, 14, 0]]}
  format={{ kind: "integer" }}
  height={380}
  ariaLabel="Flow between blocks"
  state="ready"
/>
```

Usage

The values are prepared by the caller: this component draws the points it is given and computes no statistic of its own, so units, scaling and any summary have to be settled before the data reaches it.

It is drawn by the ECharts engine.

Worked examples with real data are on the family overview: Multidimensional, network & hierarchy

import { ChordChart } from "@luc/ui/charts";
<ChordChart
  labels={["Equity", "Credit", "Rates", "Commodity"]}
  values={[[0, 42, 18, 9], [31, 0, 24, 6], [12, 27, 0, 11], [8, 5, 14, 0]]}
  format={{ kind: "integer" }}
  height={380}
  ariaLabel="Flow between blocks"
/>

Data contract

`labels` names the groups; `values` is a square matrix whose row/column order matches `labels`; `format` names the flow unit. Diagonal entries are the within-group flow.

Important configuration

Keep the label order fixed, explain whether each ribbon is directed by row-to-column, and format the shared flow unit.

Guidelines

When not to use

Do not use a chord diagram for a non-square or asymmetric matrix whose direction you cannot explain.

Configuration

Exported symbols
ExportKindSignature
ChordChart16 documented props({ labels, values, gapAngle, innerRatio, ribbonOpacity, format, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent, eager, }: ChordChartProps) => import("@type…

ChordChart props

Type: ChordChartProps

Values the compiler reads from the declaration.

ChordChart props
PropTypeDefaultNotes
ariaDescription?string | undefined—
ariaLabel?string | undefined—
className?string | undefined—
description?string | undefined—
eager?boolean | undefined—Create the engine on mount rather than when the surface is approached.
format?ChartFormat | undefined—
gapAngle?number | undefined—Radial gap between groups, radians. Default 0.022.
height?string | number | undefined—
innerRatio?number | undefined—Inner radius as a share of the outer radius. Default 0.72.
labelsreadonly string[]—Group names. The order is the matrix order.
onEvent?((event: EChartEvent) => void) | undefined—
onReady?((chart: EChartsInstance) => void) | undefined—
ribbonOpacity?number | undefined—Ribbon opacity. Default 0.42.
state?ChartState | undefined—
title?string | undefined—
valuesreadonly (readonly number[])[]—Square matrix: `values[source][target]`. Non-finite and negative cells are ignored.

Accessibility

A chart is a picture of data, so it needs a name that states what it shows, and the numbers must exist as text somewhere on the page — in a table or a written summary — because a drawing is not readable by a screen reader and cannot be copied.

What happens on the server, and when hydration changes it.

Family

Multidimensional, network & hierarchy

When the relationship, not the value, is the finding.

Luc UI v1.0ChordChartdark theme