mode="candle" and supply committed OHLC bars plus an optional in-progress candle. Both
must be SharedValues so the chart can read them on the UI thread.
Live example:
app/demo/candlestick.tsx
in the example app.Candlestick mode with a live, forming candle
The candle shape
Each bar is an OHLC bucket:candles— committed bars, sorted bytime.liveCandle— the in-progress bucket, updated each tick. Set it tonullbetween buckets.candleWidth— bucket size in seconds; drives bar width and spacing.
data / value are still used for the line/candle morph and momentum detection, so keep
feeding them alongside your candles.Coloring
Bullish/bearish body and wick colors come from the palette derived fromaccentColor + theme.
Override them precisely via the palette prop (candleUp, candleDown,
wickUp, wickDown).
Body & wick shape
The candle body radius and wick thickness live in themetrics.candle
sizing tokens. Round the body corners with bodyRadius
(clamped to half the body so thin candles stay sane) and set the wick stroke with wickWidth:
bodyRadius defaults to 0 (sharp corners); wickWidth defaults to 1. Width/spacing tokens
(bodyWidthRatio, maxBodyPx, minBodyPx) live in the same namespace — see
CandleMetrics.
Volume bars
Passvolume to draw volume bars in a reserved band below the candles. The candle/price plot
shrinks by the band height to make room (candles are never cut off) and the x-axis stays pinned to
the bottom. Each bar reads its candle’s volume; bar heights are normalized to the largest
visible volume, so the tallest visible bar fills the band. Candles without a volume draw no bar.
VolumeConfig:
Volume is candle mode only. Bars align under the candle bodies (same width + center), colored
by candle direction (up/down) unless you override
upColor / downColor.Scrubbing & the OHLC tooltip
Passscrub to enable the crosshair: the built-in tooltip shows the scrubbed candle’s O/H/L/C
stacked with its time. For full control — a minimal pill, your own layout, or to mirror the active
candle elsewhere in your UI — pass renderTooltip,
which receives the scrubbed bucket as ctx.candle. The JS-thread onScrub
callback also includes point.candle for the OHLC under the crosshair.
See the full prop list in the LiveChart reference.