All charts

stock/*

Stock

Time-series price charts with annotations — earnings windows, MAs, milestone dots.

12 variants
@vireya/ui/charts/stock/annotated

ComposedChart price line + gradient area with ReferenceArea, ReferenceLine and ReferenceDot annotations.

client
@vireya/ui/charts/stock/candlestick

OHLC candles via a custom Bar shape — wick line + open/close body, green/red by direction.

client
@vireya/ui/charts/stock/ohlc

Western OHLC tick bars: vertical wick low→high, left tick = open, right tick = close. Same data as candlestick, different Bar shape.

client
@vireya/ui/charts/stock/volume

Price line + volume bars on a dual Y axis (yAxisId discriminator). Volume colour-coded green/red by direction.

client
@vireya/ui/charts/stock/comparison

Multi-ticker comparison normalised to 100 at the start of the window, with a baseline ReferenceLine.

client
@vireya/ui/charts/stock/bollinger

Bollinger Bands: price line + 20-period SMA + ±2σ band as a tuple-dataKey Area, computed inline from the price series.

client
@vireya/ui/charts/stock/drawdown

Underwater drawdown curve: % below the running peak, inverted gradient saturates at the bottom of the band.

client
@vireya/ui/charts/stock/equityCurve

Cumulative equity curve over 24 months from a $10k base, with baseline ReferenceLine and gradient area fill.

client
@vireya/ui/charts/stock/heikinAshi

Heikin-Ashi candles: smoothed open/close averaging via the 4-line HA formulas, rendered through the candlestick's Bar shape.

client
@vireya/ui/charts/stock/returns

Histogram of daily returns over 250 sessions, 0.5% bins, sign-coloured bars, ReferenceLine at the median.

client
@vireya/ui/charts/stock/waterfall

Performance attribution waterfall: invisible base bar shifts the colored delta into its cumulative slot. Pillars = absolute totals.

client
@vireya/ui/charts/stock/yieldCurve

US Treasury yield curve by maturity (1M..30Y), today vs. 1y ago, dashed comparison line.

client

Understanding Stock charts

Financial time-series charts go beyond a single price line: candlesticks and OHLC bars encode open, high, low and close in one mark; volume, moving averages, Bollinger bands, drawdown and returns add the context traders actually use to read a market.

Vireya's stock family is the deepest in the library — thirteen variants built on recharts' ComposedChart and custom bar shapes, all tokenised so green/red direction coding follows your theme.

When to use

  • Price action over time with OHLC detail (candlestick, OHLC bars, Heikin-Ashi).
  • Price plus volume on a dual axis.
  • Technical overlays: moving averages, Bollinger bands, drawdown, returns histograms.
  • Cross-asset comparison normalised to a common starting point.

When to avoid

  • Non-financial data, where the OHLC vocabulary adds confusion.
  • Audiences unfamiliar with candlesticks — a plain line may communicate better.

Best practices

  • Keep direction colours consistent (e.g. green up / red down) across every variant.
  • Put volume on its own axis so it doesn't distort the price scale.
  • Normalise to 100 at the window start when comparing multiple tickers.
  • Annotate events (earnings, splits) with reference lines and dots.

Accessibility

  • Don't rely on green/red alone — candlestick shape also encodes direction.
  • Expose OHLC values through accessible tooltips.
  • Describe annotated events in text for non-visual users.

Frequently asked questions

What does a candlestick chart show that a line chart doesn't?
A candlestick encodes four values per period — open, high, low and close — plus direction through colour and body. A line chart shows only one value (usually close), so candlesticks reveal intraperiod volatility and sentiment that a line hides.
Can Vireya render technical indicators like Bollinger Bands?
Yes. The stock family includes Bollinger Bands (a 20-period SMA with ±2σ band), drawdown curves, returns histograms, equity curves, yield curves and more — computed inline from the price series and rendered with recharts.
Does recharts support candlesticks natively?
Not directly. Vireya implements candlestick and OHLC marks with a custom Bar shape, so you get proper wicks and bodies while staying inside the recharts ecosystem and Vireya's token system.