VolatilitySurfaceChart
Read a market, a risk or a return, with the axis and the tooltip wired for the job.
@luc/ui/chartsWhat it shows
Show a supplied two-dimensional grid of implied volatility across strike and maturity as an orthographic surface.
Live preview
A supplied grid of ratios, drawn as a projected surface — no 3D engine, and nothing is interpolated between nodes.
<VolatilitySurfaceChart
strikes={[90, 95, 100, 105, 110]}
maturities={[0.25, 0.5, 1, 2]}
vols={[
[0.241, 0.204, 0.186, 0.192, 0.218],
[0.231, 0.199, 0.183, 0.19, 0.211],
[0.224, 0.196, 0.181, 0.189, 0.207],
[0.216, 0.192, 0.179, 0.187, 0.202],
]}
strikeLabel="Strike"
maturityLabel="Maturity (years)"
height={380}
ariaLabel="Volatility surface"
/>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 { VolatilitySurfaceChart } from "@luc/ui/charts";
<VolatilitySurfaceChart
strikes={[90, 95, 100, 105, 110]}
maturities={[0.25, 0.5, 1, 2]}
vols={[
[0.241, 0.204, 0.186, 0.192, 0.218],
[0.231, 0.199, 0.183, 0.19, 0.211],
[0.224, 0.196, 0.181, 0.189, 0.207],
[0.216, 0.192, 0.179, 0.187, 0.202],
]}
strikeLabel="Strike"
maturityLabel="Maturity (years)"
height={380}
ariaLabel="Volatility surface"
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 `VolatilitySurfaceChart` from Luc UI. It is: Read a market, a risk or a return, with the axis and the tooltip wired for the job.
Import it with: import { VolatilitySurfaceChart } 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="Volatility surface"`.
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
<VolatilitySurfaceChart
strikes={[90, 95, 100, 105, 110]}
maturities={[0.25, 0.5, 1, 2]}
vols={[
[0.241, 0.204, 0.186, 0.192, 0.218],
[0.231, 0.199, 0.183, 0.19, 0.211],
[0.224, 0.196, 0.181, 0.189, 0.207],
[0.216, 0.192, 0.179, 0.187, 0.202],
]}
strikeLabel="Strike"
maturityLabel="Maturity (years)"
height={380}
ariaLabel="Volatility surface"
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 an ECharts custom series whose geometry the library computes, without WebGL.
Worked examples with real data are on the family overview: Financial & quantitative
import { VolatilitySurfaceChart } from "@luc/ui/charts";<VolatilitySurfaceChart
strikes={[90, 95, 100, 105, 110]}
maturities={[0.25, 0.5, 1, 2]}
vols={[
[0.241, 0.204, 0.186, 0.192, 0.218],
[0.231, 0.199, 0.183, 0.19, 0.211],
[0.224, 0.196, 0.181, 0.189, 0.207],
[0.216, 0.192, 0.179, 0.187, 0.202],
]}
strikeLabel="Strike"
maturityLabel="Maturity (years)"
height={380}
ariaLabel="Volatility surface"
/>Data contract
`strikes` and `maturities` define the grid; `vols[maturity][strike]` is the full numeric matrix of ratios. The caller must provide a complete grid; the chart does not interpolate holes.
Important configuration
Label all three axes with `strikeLabel`, `maturityLabel` and the value format, and keep the grid orientation consistent between runs.
Guidelines
When not to use
Do not claim a fitted surface or fill a sparse quote matrix by interpolation in the chart; a missing cell is an absent observation.
Configuration
| Export | Kind | Signature |
|---|---|---|
VolatilitySurfaceChart | 20 documented props | ({ strikes, maturities, vols, strikeLabel, maturityLabel, percent, azimuth, elevation, onViewChange, mode, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent, … |
VolatilitySurfaceChart props
Type: VolatilitySurfaceChartProps
Values the compiler reads from the declaration.
| Prop | Type | Default | Notes |
|---|---|---|---|
ariaDescription? | string | undefined | — | |
ariaLabel? | string | undefined | — | |
azimuth? | number | undefined | — | |
className? | string | undefined | — | |
description? | string | undefined | — | |
eager? | boolean | undefined | — | Create the engine on mount rather than when the surface is approached. |
elevation? | number | undefined | — | |
height? | string | number | undefined | — | |
maturities | readonly number[] | — | Maturity values, one per row, ascending. Units are the caller's (years, days). |
maturityLabel? | string | undefined | — | Caption for the maturity axis, e.g. "Maturity (years)". |
mode? | "surface" | "wireframe" | undefined | — | |
onEvent? | ((event: EChartEvent) => void) | undefined | — | |
onReady? | ((chart: EChartsInstance) => void) | undefined | — | |
onViewChange? | ((view: { azimuth: number; elevation: number; }) => void) | undefined | — | |
percent? | boolean | undefined | — | Show volatilities as percentages. Default `true`. |
state? | ChartState | undefined | — | |
strikeLabel? | string | undefined | — | Caption for the strike axis, e.g. "Strike" or "Moneyness (K/S)". |
strikes | readonly number[] | — | Strike or moneyness values, one per column, ascending. |
title? | string | undefined | — | |
vols | readonly (readonly number[])[] | — | Implied volatilities as a **ratio** (`0.24` = 24%), `vols[maturityIndex][strikeIndex]`. |
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
Financial & quantitative
Presentation only: not one metric here is computed by the library.
Related