Skip to content
StatisticalGenerated from the public API

QuadrantScatterChart

See the distribution, the agreement or the uncertainty in the values you supply.

@luc/ui/charts

What it shows

Place observations on two numeric axes and name the four regions defined by explicit reference lines.

Live preview

Eight labelled observations split by the caller's reference lines, which are the chart.

<QuadrantScatterChart
  points={[
    { x: -1.42, y: -1.18, label: "EQ" },
    { x: -1.05, y: -0.84, label: "HY" },
    { x: -0.63, y: -0.51, label: "IG" },
    { x: -0.24, y: -0.31, label: "CMD" },
    { x: 0.18, y: 0.11, label: "FX" },
    { x: 0.55, y: 0.62, label: "REIT" },
    { x: 0.94, y: 0.71, label: "GOLD" },
    { x: 1.38, y: 1.24, label: "TECH" },
  ]}
  xReference={0}
  yReference={0}
  quadrantLabels={{ topRight: "Add", topLeft: "Watch", bottomRight: "Review", bottomLeft: "Avoid" }}
  pointLabel="Asset"
  xLabel="Factor exposure"
  yLabel="Realised return"
  height={340}
  ariaLabel="Assets by quadrant"
/>

Controls

Height

340px

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 { QuadrantScatterChart } from "@luc/ui/charts";

<QuadrantScatterChart
  points={[
    { x: -1.42, y: -1.18, label: "EQ" },
    { x: -1.05, y: -0.84, label: "HY" },
    { x: -0.63, y: -0.51, label: "IG" },
    { x: -0.24, y: -0.31, label: "CMD" },
    { x: 0.18, y: 0.11, label: "FX" },
    { x: 0.55, y: 0.62, label: "REIT" },
    { x: 0.94, y: 0.71, label: "GOLD" },
    { x: 1.38, y: 1.24, label: "TECH" },
  ]}
  xReference={0}
  yReference={0}
  quadrantLabels={{ topRight: "Add", topLeft: "Watch", bottomRight: "Review", bottomLeft: "Avoid" }}
  pointLabel="Asset"
  xLabel="Factor exposure"
  yLabel="Realised return"
  height={340}
  ariaLabel="Assets by quadrant"
  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 `QuadrantScatterChart` from Luc UI. It is: See the distribution, the agreement or the uncertainty in the values you supply.

Import it with: import { QuadrantScatterChart } 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="Assets by quadrant"`.

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
<QuadrantScatterChart
  points={[
    { x: -1.42, y: -1.18, label: "EQ" },
    { x: -1.05, y: -0.84, label: "HY" },
    { x: -0.63, y: -0.51, label: "IG" },
    { x: -0.24, y: -0.31, label: "CMD" },
    { x: 0.18, y: 0.11, label: "FX" },
    { x: 0.55, y: 0.62, label: "REIT" },
    { x: 0.94, y: 0.71, label: "GOLD" },
    { x: 1.38, y: 1.24, label: "TECH" },
  ]}
  xReference={0}
  yReference={0}
  quadrantLabels={{ topRight: "Add", topLeft: "Watch", bottomRight: "Review", bottomLeft: "Avoid" }}
  pointLabel="Asset"
  xLabel="Factor exposure"
  yLabel="Realised return"
  height={340}
  ariaLabel="Assets by quadrant"
  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: Statistical

import { QuadrantScatterChart } from "@luc/ui/charts";
<QuadrantScatterChart
  points={[
    { x: -1.42, y: -1.18, label: "EQ" },
    { x: -1.05, y: -0.84, label: "HY" },
    { x: -0.63, y: -0.51, label: "IG" },
    { x: -0.24, y: -0.31, label: "CMD" },
    { x: 0.18, y: 0.11, label: "FX" },
    { x: 0.55, y: 0.62, label: "REIT" },
    { x: 0.94, y: 0.71, label: "GOLD" },
    { x: 1.38, y: 1.24, label: "TECH" },
  ]}
  xReference={0}
  yReference={0}
  quadrantLabels={{ topRight: "Add", topLeft: "Watch", bottomRight: "Review", bottomLeft: "Avoid" }}
  pointLabel="Asset"
  xLabel="Factor exposure"
  yLabel="Realised return"
  height={340}
  ariaLabel="Assets by quadrant"
/>

Data contract

`points` contain a label plus x/y values; `xReference`, `yReference`, `quadrantLabels`, `xLabel` and `yLabel` define the reading frame. Reference values are the caller's thresholds.

Important configuration

State the reference values and their source, label the quadrants with the decision vocabulary, and use `pointLabel` only where the text is readable.

Guidelines

When not to use

Do not draw arbitrary thresholds and call the quadrants objective; the reference lines are the analytical claim.

Configuration

Exported symbols
ExportKindSignature
QuadrantScatterChart19 documented props({ points, xReference, yReference, quadrantLabels, pointTone, pointLabel, xFormat, yFormat, xLabel, yLabel, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent,…

QuadrantScatterChart props

Type: QuadrantScatterChartProps

Values the compiler reads from the declaration.

QuadrantScatterChart props
PropTypeDefaultNotes
ariaDescription?string | undefined—
ariaLabel?string | undefined—
className?string | undefined—
description?string | undefined—
height?string | number | undefined—
onEvent?((event: EChartEvent) => void) | undefined—
onReady?((chart: EChartsInstance) => void) | undefined—
pointLabel?string | undefined—
pointsreadonly Observation[]—
pointTone?SeriesTone | undefined—Optional per-point tone override; defaults to a stable categorical colour.
quadrantLabels?QuadrantLabels | undefined—
state?ChartState | undefined—
title?string | undefined—
xFormat?ChartFormat | undefined—
xLabel?string | undefined—
xReferencenumber—Vertical and horizontal split values (e.g. 0, a mean, a target).
yFormat?ChartFormat | undefined—
yLabel?string | undefined—
yReferencenumber—

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.

Luc UI v1.0QuadrantScatterChartdark theme