LCLiveCharts
API

LiveChart

Complete React props reference for livecharts/react

Import:

import { LiveChart } from "livecharts/react";
import type { LiveChartProps } from "livecharts/react";

The component fills its parent. Set a height on the wrapper.


Data

PropTypeDefaultDescription
dataLiveChartPoint[]requiredHistory points { time, value } (unix seconds)
valuenumberrequiredLatest scalar reading
seriesLiveChartSeries[]Multi-series mode; overrides data / value / color when non-empty

Appearance

PropTypeDefaultDescription
theme"light" | "dark""dark"Surface / chrome mode
colorstring"#3b82f6"Accent CSS color
gridbooleantrueValue grid + labels
badgebooleantrueLive value badge at the tip
badgeVariant"default" | "minimal""default"Accent pill vs quiet pill
badgeTailbooleantrueBadge pointer toward the tip
fillbooleantrueUnder-line gradient
pulsebooleantrueTip glow pulse
lineWidthnumber2Stroke width (px)

Features

PropTypeDefaultDescription
momentumboolean | MomentumtrueAuto arrows, forced direction, or off
scrubbooleantrueCrosshair + tooltips on hover
exaggeratebooleanfalseTighten Y-range for small moves
showValuebooleanfalseLarge DOM value overlay
valueMomentumColorbooleanfalseTint overlay by momentum
degenboolean | DegenOptionsfalseParticles + shake on swings

Momentum = "up" \| "down" \| "flat".

State

PropTypeDefaultDescription
loadingbooleanfalseBreathing placeholder; morphs into data
pausedbooleanfalseFreeze scroll; resume fades or morphs
emptyTextstring"No data to display"Empty-state copy
pauseWhenOffscreenbooleantrueStop rAF while offscreen

Time

PropTypeDefaultDescription
windownumber30Visible horizon (seconds)
windowsWindowOption[]Horizon button bar
onWindowChange(secs: number) => voidFired when the user picks a horizon button
windowStyle"default" | "rounded" | "text""default"Button bar style

Chrome slots

Replace built-in toolbar pieces with custom DOM. See Chrome slots.

PropTypeDescription
renderWindows(props) => ReactNodeCustom time-window controls
renderModeToggle(props) => ReactNodeCustom line/candle toggle
renderSeriesToggle(props) => ReactNodeCustom series visibility chips

Crosshair

PropTypeDefaultDescription
tooltipYnumber14Tooltip vertical offset
tooltipOutlinebooleantrueTooltip border
onHover(point: HoverPoint | null) => voidScrub callback
cursorstring"crosshair"CSS cursor

Orderbook

PropTypeDefaultDescription
orderbookOrderbookDataStreaming bid/ask labels

Candlestick

PropTypeDefaultDescription
mode"line" | "candle""line"Active view + morph
candlesCandlePoint[]Closed OHLC candles
liveCandleCandlePointForming candle
candleWidthnumberBucket width (seconds)
onModeChange(mode: "line" | "candle") => voidMode toggle callback
lineModebooleanDeprecated — prefer mode
lineDataLiveChartPoint[]Deprecated
lineValuenumberDeprecated

Series UI

PropTypeDefaultDescription
onSeriesToggle(id: string, visible: boolean) => voidChip toggle callback
seriesToggleCompactbooleanfalseCompact chip layout

Accessibility

PropTypeDefaultDescription
a11ybooleantrueFocusable plot + keyboard scrub + live region
ariaLabelstring"Live chart"Accessible name for the plot region

See Accessibility.

Advanced

PropTypeDefaultDescription
referenceLineReferenceLineHorizontal threshold
formatValue(v: number) => stringv.toFixed(2)Badge, overlay, tooltips
formatTime(t: number) => stringHH:MM:SSCrosshair time
lerpSpeednumber0.08Display lerp rate
paddingPaddingsee belowChart insets
classNamestringRoot class
styleCSSPropertiesRoot style

Default padding: { top: 12, right: auto, bottom: 28, left: 12 } (right adapts for badge).


Related: Types · Guides · Demo

On this page