ParallelCoordinatesChart
Read a field, a geometry or a spectrum, with the scale handled for you.
@luc/ui/chartsWhat it shows
Compare several normalized or individually scaled dimensions across rows, revealing trade-offs that a 2D scatter cannot show.
Live preview
Four metrics on one polyline per portfolio: crossings show trade-offs a scatter cannot.
<ParallelCoordinatesChart
axes={[
{ key: "ret", label: "Return", format: { kind: "number", decimals: 1, suffix: "%" } },
{
key: "vol",
label: "Volatility",
format: { kind: "number", decimals: 1, suffix: "%" },
},
{ key: "sharpe", label: "Sharpe", format: { kind: "number", decimals: 2 } },
{
key: "drawdown",
label: "Max DD",
format: { kind: "number", decimals: 1, suffix: "%" },
},
]}
rows={[
{ ret: 0.9, vol: 14.2, sharpe: 1.24, drawdown: -6.1 },
{ ret: 1.4, vol: 18.6, sharpe: 1.02, drawdown: -9.4 },
{ ret: -0.4, vol: 11.1, sharpe: -0.36, drawdown: -4.2 },
{ ret: 2.1, vol: 22.4, sharpe: 0.94, drawdown: -12.8 },
{ ret: 0.6, vol: 9.8, sharpe: 0.88, drawdown: -3.1 },
{ ret: 1.8, vol: 19.3, sharpe: 1.11, drawdown: -8.6 },
]}
opacity={0.5}
height={340}
ariaLabel="Portfolios across four axes"
/>Controls
Height
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.
The same fixture as the live preview above; the controls change how it is drawn, not what it measures.
Code
import { ParallelCoordinatesChart } from "@luc/ui/charts";
<ParallelCoordinatesChart
axes={[
{ key: "ret", label: "Return", format: { kind: "number", decimals: 1, suffix: "%" } },
{
key: "vol",
label: "Volatility",
format: { kind: "number", decimals: 1, suffix: "%" },
},
{ key: "sharpe", label: "Sharpe", format: { kind: "number", decimals: 2 } },
{
key: "drawdown",
label: "Max DD",
format: { kind: "number", decimals: 1, suffix: "%" },
},
]}
rows={[
{ ret: 0.9, vol: 14.2, sharpe: 1.24, drawdown: -6.1 },
{ ret: 1.4, vol: 18.6, sharpe: 1.02, drawdown: -9.4 },
{ ret: -0.4, vol: 11.1, sharpe: -0.36, drawdown: -4.2 },
{ ret: 2.1, vol: 22.4, sharpe: 0.94, drawdown: -12.8 },
{ ret: 0.6, vol: 9.8, sharpe: 0.88, drawdown: -3.1 },
{ ret: 1.8, vol: 19.3, sharpe: 1.11, drawdown: -8.6 },
]}
opacity={0.5}
height={340}
ariaLabel="Portfolios across four axes"
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 `ParallelCoordinatesChart` from Luc UI. It is: Read a field, a geometry or a spectrum, with the scale handled for you.
Import it with: import { ParallelCoordinatesChart } 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={340}`, `state="ready"`, `ariaLabel="Portfolios across four axes"`.
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
<ParallelCoordinatesChart
axes={[
{ key: "ret", label: "Return", format: { kind: "number", decimals: 1, suffix: "%" } },
{
key: "vol",
label: "Volatility",
format: { kind: "number", decimals: 1, suffix: "%" },
},
{ key: "sharpe", label: "Sharpe", format: { kind: "number", decimals: 2 } },
{
key: "drawdown",
label: "Max DD",
format: { kind: "number", decimals: 1, suffix: "%" },
},
]}
rows={[
{ ret: 0.9, vol: 14.2, sharpe: 1.24, drawdown: -6.1 },
{ ret: 1.4, vol: 18.6, sharpe: 1.02, drawdown: -9.4 },
{ ret: -0.4, vol: 11.1, sharpe: -0.36, drawdown: -4.2 },
{ ret: 2.1, vol: 22.4, sharpe: 0.94, drawdown: -12.8 },
{ ret: 0.6, vol: 9.8, sharpe: 0.88, drawdown: -3.1 },
{ ret: 1.8, vol: 19.3, sharpe: 1.11, drawdown: -8.6 },
]}
opacity={0.5}
height={340}
ariaLabel="Portfolios across four axes"
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: Scientific & mathematical
import { ParallelCoordinatesChart } from "@luc/ui/charts";<ParallelCoordinatesChart
axes={[
{ key: "ret", label: "Return", format: { kind: "number", decimals: 1, suffix: "%" } },
{
key: "vol",
label: "Volatility",
format: { kind: "number", decimals: 1, suffix: "%" },
},
{ key: "sharpe", label: "Sharpe", format: { kind: "number", decimals: 2 } },
{
key: "drawdown",
label: "Max DD",
format: { kind: "number", decimals: 1, suffix: "%" },
},
]}
rows={[
{ ret: 0.9, vol: 14.2, sharpe: 1.24, drawdown: -6.1 },
{ ret: 1.4, vol: 18.6, sharpe: 1.02, drawdown: -9.4 },
{ ret: -0.4, vol: 11.1, sharpe: -0.36, drawdown: -4.2 },
{ ret: 2.1, vol: 22.4, sharpe: 0.94, drawdown: -12.8 },
{ ret: 0.6, vol: 9.8, sharpe: 0.88, drawdown: -3.1 },
{ ret: 1.8, vol: 19.3, sharpe: 1.11, drawdown: -8.6 },
]}
opacity={0.5}
height={340}
ariaLabel="Portfolios across four axes"
/>Data contract
`axes` defines each dimension's key and range; each `rows[]` entry supplies one value per axis. The caller owns normalisation and must not compare mismatched scales without saying so.
Important configuration
Set axis ranges explicitly, use `opacity` to manage overplotting, and highlight one row with a semantic tone when one comparison is the subject.
Guidelines
When not to use
Do not make raw variables with incomparable units look interchangeable by leaving every axis on the same visual height without a documented scale.
Configuration
| Export | Kind | Signature |
|---|---|---|
ParallelCoordinatesChart | 15 documented props | ({ axes, rows, rowTone, opacity, visualKey, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent, eager, }: ParallelCoordinatesChartProps) => import("@types/reac… |
ParallelCoordinatesChart props
Type: ParallelCoordinatesChartProps
Values the compiler reads from the declaration.
| Prop | Type | Default | Notes |
|---|---|---|---|
ariaDescription? | string | undefined | — | |
ariaLabel? | string | undefined | — | |
axes | readonly ParallelAxisSpec[] | — | |
className? | string | undefined | — | |
description? | string | undefined | — | |
eager? | boolean | undefined | — | Create the engine on mount rather than when the surface is approached. |
height? | string | number | undefined | — | |
onEvent? | ((event: EChartEvent) => void) | undefined | — | |
onReady? | ((chart: EChartsInstance) => void) | undefined | — | |
opacity? | number | undefined | — | Fade the polylines so overlapping observations stay readable. |
rows | readonly Record<string, number>[] | — | One entry per observation. Missing keys leave the polyline discontinuous. |
rowTone? | ((row: Record<string, number>, index: number) => SeriesTone | undefined) | undefined | — | Optional per-row tone resolved by the caller (e.g. its cluster or class). |
state? | ChartState | undefined | — | |
title? | string | undefined | — | |
visualKey? | string | undefined | — | Colour lines by a numeric key instead of by a flat tone. |
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
Scientific & mathematical
Fields, geometry and spectra for scientific readers.
Related