Skip to content
Financial & quantitativeGenerated from the public API

HistoricalPositionChart

Read a market, a risk or a return, with the axis and the tooltip wired for the job.

@luc/ui/charts

What it shows

Place one current reading on a supplied historical quantile band.

Live preview

One served percentile on a quantile band: the reading is yours, the band is the chart's.

<HistoricalPositionChart
  percentile={78}
  value="+4.1 %"
  percentileLabel="78th percentile"
  height={56}
  ariaLabel="Position in history"
/>

Controls

Modified

Height

200px

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

<HistoricalPositionChart
  percentile={78}
  value="+4.1 %"
  percentileLabel="78th percentile"
  height={200}
  ariaLabel="Position in history"
  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 `HistoricalPositionChart` 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 { HistoricalPositionChart } 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={200}`, `state="ready"`, `ariaLabel="Position in history"`.

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
<HistoricalPositionChart
  percentile={78}
  value="+4.1 %"
  percentileLabel="78th percentile"
  height={200}
  ariaLabel="Position in history"
  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: Financial & quantitative

import { HistoricalPositionChart } from "@luc/ui/charts";
<HistoricalPositionChart
  percentile={78}
  value="+4.1 %"
  percentileLabel="78th percentile"
  height={56}
  ariaLabel="Position in history"
/>

Data contract

`percentile` and `value` describe the reading; the component draws the band and the marker, not a historical time series. The percentile is the caller's classification.

Important configuration

Use `percentileLabel` to name the band, format the value in its measurement unit, and state the lookback window in the caption.

Guidelines

When not to use

Do not call the reading expensive or cheap from position alone; the percentile is descriptive and the threshold belongs to the analysis.

Configuration

Exported symbols
ExportKindSignature
HistoricalPositionChart9 documented props({ percentile, value, ticks, percentileLabel, tone, height, ariaLabel, ariaDescription, className, }: HistoricalPositionChartProps) => import("@types/react").JSX.Element

HistoricalPositionChart props

Type: HistoricalPositionChartProps

Values the compiler reads from the declaration.

HistoricalPositionChart props
PropTypeDefaultNotes
ariaDescription?string | undefined—
ariaLabel?string | undefined—
className?string | undefined—
height?number | undefined—Box height, in CSS pixels. Defaults to the compact readout band.
percentilenumber | null | undefined—The served percentile, 0–100. Values outside the range are clamped.
percentileLabel?string | null | undefined—A spoken label for the current percentile, e.g. "78th percentile".
ticks?readonly number[] | undefined—The quantile ticks to label. Defaults to the conventional deciles.
tone?HistoricalPositionTone | undefined—
value?string | null | undefined—The formatted current reading, shown beside the marker.

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.0HistoricalPositionChartdark theme