ChartProps
Documentation / @elitechart/react / ChartProps
Defined in: react/src/types.ts:34
Props accepted by the <Chart /> component.
Mirrors ChartOptions from @elitechart/core minus the
theme field (we expose theme directly so it can be a reactive
prop) plus a handful of DOM-side knobs (className, style).
Example
Extends
Omit<ChartOptions,"theme"|"onReady">
Properties
className?
Defined in: react/src/types.ts:38
Forwarded to the mount <div>.
contextMenu?
Defined in: core/dist/index.d.ts:1552
Show the right-click context menu on drawings. Defaults to true.
Menu items: Duplicate, Bring to front, Send to back, Lock/Unlock, Delete.
Inherited from
floatingToolbar?
Defined in: core/dist/index.d.ts:1547
Show the per-drawing floating toolbar when a drawing is selected.
Defaults to true. Set false to opt out (e.g. when the embedding app
provides its own drawing chrome).
Inherited from
initialVisibleBars?
Defined in: core/dist/index.d.ts:1537
Number of bars visible at startup, counted from the most recent.
Defaults to min(120, bars.length).
Inherited from
ChartOptions.initialVisibleBars
kind?
Defined in: core/dist/index.d.ts:1530
How to visualize the series. Defaults to 'candle'.
Inherited from
magnet?
Defined in: core/dist/index.d.ts:1577
Magnet mode — snap crosshair + drawing anchors to the nearest OHLC
value. Defaults to 'off'.
'off'— no snapping, pointer used as-is.'weak'— snap only when the pointer is within ~10 px of an OHLC value.'strong'— always snap to the closest OHLC value on the nearest bar.
Inherited from
onError?
Defined in: core/dist/index.d.ts:1600
Error hook for listener exceptions. Defaults to console.error.
Parameters
err
unknown
context
string
Returns
void
Inherited from
onReady?
Defined in: react/src/types.ts:47
Fires once the chart engine has fully booted and the first frame has painted. Receives the live ChartHandle so callers can imperatively drive the chart from the same render where the component mounts.
Parameters
handle
Returns
void
onRequestHistory?
Defined in: core/dist/index.d.ts:1594
Invoked when the user pans past the first bar in the series. The
embedder fetches more historical bars from its datafeed and calls
chart.setSeries(...) with the extended range. Debounced so rapid
pans fire once.
When omitted, panning past the first bar just shows empty space — the viewport continues to shift but no data loads.
Parameters
arg
earliestLoadedTime
Returns
void
Inherited from
persistentTool?
Defined in: core/dist/index.d.ts:1584
When true, drawing tools stay active after placement so the user can
drop multiple instances without re-clicking the toolbar. Commonly
exposed as a "stay in drawing mode" / pin affordance. Defaults to
false.
Inherited from
pricePadFraction?
Defined in: core/dist/index.d.ts:1541
Fractional padding above/below the visible price range. Defaults to 0.08 (8%).
Inherited from
priceScale?
Defined in: core/dist/index.d.ts:1532
Price-axis scaling. Defaults to 'linear'.
Inherited from
series
Defined in: core/dist/index.d.ts:1528
The initial series to render.
Inherited from
showOhlcvLegend?
Defined in: core/dist/index.d.ts:1568
Paint the canvas-side OHLCV legend (the small O … H … L … C … V
string at the chart's top-left, updated to follow the crosshair).
Defaults to true. Set false when the embedder ships its own
symbol/price/OHLCV header (e.g. EliteChart's <HeroPrice />)
to avoid duplicate paint paths for the same data.
Inherited from
style?
Defined in: react/src/types.ts:40
Forwarded to the mount <div>. Defaults to { width: '100%', height: '100%' }.
theme?
Defined in: react/src/types.ts:36
Optional initial theme. Defaults to the built-in dark fallback.
useInternalDialogs?
Defined in: core/dist/index.d.ts:1560
Open the built-in AlertsDialog and SettingsDialog when "Manage
alerts…" / "Settings…" are picked from the chart-context menu.
Defaults to true. Set false when the embedder ships richer
replacements and wants to react to the chart-context:manage-alerts
/ chart-context:settings events directly.