Skip to content

CandlestickGL

stable

GPU-accelerated OHLC candlestick chart via WebGL2 (fallback WebGL1). Renders 50k+ candles at 60fps. Hardware-accelerated zoom/pan, crosshair tooltip, bull/bear coloring from DS semantic tokens.

FinanceInteractive/Storybook ↗
import { CandlestickGL } from "@danagraph/design-system/finance"
Loading demo…

Props

datarequired
Type CandlestickBar[]Default —

OHLC bars with unix ms timestamps

height
Type numberDefault —

Chart height in px (default 280)

bodyWidthRatio
Type numberDefault —

Candle body width as fraction of slot 0..1 (default 0.6)

onCrosshair
Type (bar: T | null) => voidDefault —

Callback when crosshair moves over a candle

semanticoutcomeagency
MobileStacks / Scroll

WebGL canvas requires min 320px. Pinch-to-zoom via pointer events works on mobile. Wrap in overflow-x-auto for very narrow viewports.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?