Skip to main content

react-native-vroom-chart

Type Aliases

Type AliasDescription
ATRConfigATR (Average True Range) indicator config. Rendered in its own pane below the candles: a single line measuring volatility in price units.
ATRSmoothingHow the true-range series is smoothed into ATR. 'rma' is Wilder's original (alpha = 1/period) and the conventional default; the other two are the ordinary moving averages applied to the same series.
BollingerBandsConfigBollinger Bands overlay config. A basis moving average of source over period, banded at ± stdDev × population standard deviation of the same window, drawn as three lines on the price pane with an optional translucent fill between the bands. No pane is reserved.
CandleA single OHLCV bar. candles is an array of these.
ChartTypeHow the price series is drawn. 'candles' — default: candlestick bodies + wicks. 'line' — a single polyline through each candle's close. Volume, indicators, overlays, crosshair, and drawings still render.
CrosshairEventPayload passed to onCrosshair as the crosshair shows, moves, or hides.
DataTransitionHow a new candles array relates to the one the chart already holds: 'initial' is the first data, 'stream' a live update to the same series, 'timeframe' the same asset re-bucketed into a different interval, and 'reset' a different series entirely.
DefaultDrawingStyleDefault appearance for drawings the user creates — the live draft and the object handed to onDrawingComplete. Paste copies the source drawing's style instead of this default.
FairValueGapsConfigFair Value Gap overlay config. Shaded boxes on the price pane marking three-candle imbalances — a run so fast the first and third candles' wicks never overlap, leaving a band of price that was skipped.
FootprintA single filled trade, drawn as a circular badge above the candle it fell in — the "footprint" a trader leaves on the chart: buy marks an entry (a + badge in the bull color), sell marks an exit (a badge in the bear color).
FootprintEventFired when the pointer enters, moves between, or leaves footprint badges (on touch platforms, when one is tapped or dismissed).
FootprintSideWhich side of a position a footprint marks.
FootprintsStyleShared layout/style for every footprint badge, passed via footprintsStyle.
IchimokuConfigIchimoku Kinko Hyo overlay config. Five lines on the price pane plus the cloud (kumo) shaded between the two leading spans. No pane is reserved.
IntervalTransitionHow a same-asset interval switch animates. 'transform' (default) lerps each visible column into its counterpart. 'fade' fades the old scene out then the new one in — use when the two windows don’t share a 1:1 pairing (e.g. a fixed lookback).
MACDConfigMACD indicator config. Rendered in its own pane below the candles: the gap between a fast and a slow moving average, a signal line smoothing that gap, and a histogram of the distance between the two.
MAKindAveraging used by a moving average: simple or exponential.
MASourcePrice source for a moving average.
MovingAverageOverlayA moving-average overlay line drawn on the price pane. Provide an array of these via movingAverages to render a ribbon of SMA/EMA lines.
PlotRectThe chart's plot area in logical px relative to the chart element's top-left: the candles and everything drawn over them, with the price and time axis strips excluded.
PriceLineA consumer-supplied horizontal status line at a fixed price — the primitive behind resting limit orders, take-profits, stop-losses and liquidation levels.
PriceLinesStyleShared layout/style for every price line, passed via priceLinesStyle.
RSIConfigRSI indicator config. Rendered in a pane below the candles when enabled: the RSI line, an optional moving-average trendline over it, and two dashed rules at the overbought and oversold levels.
StreamTransitionHow a live update to the series being displayed animates. 'none' (default) applies it on the next frame with no animation and leaves the viewport where it is. 'transform' eases the in-progress bar into its new values and, when the view is already pinned to the newest bar, slides the series left as each new bar arrives.
TransitionEasingEasing curve for animated transitions (candle↔line and interval switches). Defaults to 'ease-in-out'.
VisibleRangeA time window over the candle data, as Unix epoch milliseconds.
VolumeConfigVolume bar config. One bottom-anchored bar per candle on the price pane, drawn under the candles and sharing their x position and body width.
VroomChartPropsProps for the VroomChart component. The cross-platform props come from VroomChartCoreProps; style is the React Native flavor.
VroomColorA color value: a hex string ('#0d1117', or 8-digit '#aarrggbb') or a packed ARGB number. In VroomTheme every field is optional — omitted colors keep the library default.
VroomThemeColor overrides for the chart, passed via the theme prop.
VWAPConfigVWAP overlay config (session anchor). Drawn as a single line on the price pane, resetting each session.

Functions

FunctionDescription
classifyTransitionClassify a candles-prop change. prev is the previously rendered array (null on first render); seriesKeyChanged forces reset regardless of the data (the explicit escape hatch).
inferStepMsThe candle period in ms, inferred as the median of the first few intervals (robust to a single gap). Null when there are fewer than two candles.
timeframeWindowThe visible window to apply after a timeframe switch so each candle keeps the exact pixel width it had before: the visible slot count is preserved and the right edge re-anchors on the newest candle (any future-gap overshoot is carried over in slots, clamped to the core's 3/4-window cap). The new start may precede the first candle — that gap is intentional, width wins.
VroomChartSkia-rendered candlestick chart. Pass OHLCV candles and size it via style (it fills its parent by default). Pan to scroll, pinch to zoom, drag the price/time axes to rescale, and long-press for the crosshair. Optional indicators (rsi, macd, movingAverages, vwap, bollingerBands, ichimoku, and more), colors (theme), and events (onCrosshair, onViewportChange) are configured through props.