Examples

OHLC price series

Preview
Weekly share priceCandlestick chart over 4 periods, opening at 102 and closing at 119.
Use the arrow keys to move between data points, Home and End to jump to the first and last.
Example.tsx
import { CandlestickChart } from '@reactloom/charts';

const data = [
  { date: 'Mon', open: 102, high: 112, low: 98, close: 109 },
  { date: 'Tue', open: 109, high: 116, low: 104, close: 106 },
  { date: 'Wed', open: 106, high: 118, low: 105, close: 115 },
  { date: 'Thu', open: 115, high: 121, low: 110, close: 119 },
];

export default function Example() {
  return <CandlestickChart title="Weekly share price" data={data} x="date" open="open" high="high" low="low" close="close" />;
}

API reference

CandlestickChart props
PropTypeDefault
datarequired
OHLC records.
readonly Row[]—
xrequired
Period or date accessor.
Accessor<Row, XValue>—
open · high · low · closerequired
Accessors for the four OHLC values.
Accessor<Row, number>—

Keyboard interaction

Keyboard interactions
KeyAction
ArrowLeft / ArrowRightInspect each period and announce open, high, low, and close

Usage guidelines

Do

  • Keep the data table toggle enabled so screen-reader users can inspect exact OHLC values.

Don’t

  • Avoid plotting hundreds of candles without aggregating into weekly or monthly intervals.