API overview
The main objects of the public API - renderer, series, scales and the React and element entry points.
This page covers the shape of the public API: which objects most integrations touch, what the frame object carries and where the generated reference lives.
The public surface is intentionally small. Most integrations touch only UnifinChart
(React) or <unifin-chart> (HTML); direct core usage drives the renderer with a frame object.
Generated references: Core, Indicators, React, Element, Bonds kit, Portfolio kit, Options kit, Swaps kit.
Core objects (@unifin/chart-core)
| Object | Purpose | Key members |
|---|---|---|
Canvas2DRenderer | Paints one frame | render(context, frame) |
Series | Bar storage for one symbol and timeframe | setHistory, toArray, length |
TimeScale | Horizontal mapping and visible range | setBarCount, setVisibleRange, scrollToLastBar |
PriceScale | Vertical mapping and price modes | setHeight, fitContent |
SERIES_RENDER_TYPES | Runtime list of the 23 series identifiers | - |
Frame object
renderer.render(context, {
bars, // readonly Bar[]
width, height, // canvas size in CSS pixels
timeScale, priceScale,
theme, // DARK_THEME | LIGHT_THEME | ORANGE_THEME | systemTheme(prefersLight)
priceAxisWidth, // 0 hides the axis
renderProfile, // 'sparkline' | 'mini' | 'standard' | 'terminal'
seriesType, // one of SERIES_RENDER_TYPES
instrument, timeframe, locale,
crosshair, // optional { index, price }
overlays, // optional host-computed indicator lines
footprint, // optional cluster data for the footprint series
});React (@unifin/chart-react)
UnifinChart props:
| Prop | Type | Notes |
|---|---|---|
symbol, timeframe, bars | required | Bar[] with time, OHLC and volume |
instrument | Instrument | Tick step, digits, currency |
theme, locale | theme object / 'en' | 'ru' | Dark theme and 'en' are typical |
seriesType | SeriesRenderType | Defaults to candles |
height, priceAxisWidth, showGrid | numbers / boolean | Layout knobs |
mode | 'chart' | 'mini' | 'sparkline' | Presentation role |
overlays | LineOverlay[] | Indicator curves and level lines |
tooltip, tooltipHold | boolean / milliseconds | Hover card and its hold window (default 5000 ms) |
ariaLabel, className, onReady | - | Accessibility and lifecycle |
Also exported: Sparkline, MiniChart, ChartGrid, createSyncGroup, useChart, and the UI kit
(UiButton, UiInput, UiSelect, UiDialog, UiMenu, UiTooltip, ensureUiStyles).
Custom element (@unifin/chart-element)
Attributes: symbol, timeframe, theme (dark | light | corporate | capitalMarkets |
orange | unifin | system), series-type,
scene, mini, renko-brick, show-grid, price-axis-width, tick-step, crosshair,
readout-mode, crosshair-time, tooltip, tooltip-hold (hover-card hold in ms, default 5000).
Methods: setScene, replayPlay/replayPause/replaySeek/replayExit, fibonacciEnable,
setBarSpacing/zoomBy/resetView, setStop/setTake/setOrderLine (draggable trading lines
with a version journal), yForPrice.
Events: unifin-ready, scene:change, replay:progress, view:change, crosshair-move,
crosshair-leave, bar-click, stop:dragstart/stop:drag/stop:change,
order:dragstart/order:drag/order:change.
Properties: bars, chart (binding), canvasElement. Register with defineUnifinChart().
Interactive chart
The same configuration rendered on this page:
This page is a curated overview. A fully generated reference for every exported symbol follows below; llms-full.txt contains the complete documentation text for assistant-assisted lookups.
Generated reference
The four pages below are generated from the package entries themselves (TypeScript compiler API, JSDoc first paragraphs, source order). They are rebuilt on every portal build, so they always match the shipped code.
| Page | Package | Contents |
|---|---|---|
| Core | @unifin/chart-core | Renderer, data layer, scales, drawing, profiles, alerts, trading models |
| Indicators | @unifin/chart-indicators | The 128-indicator catalogue and the study engines |
| React | @unifin/chart-react | Components, hooks, binding, editions (light, standard, pro) |
| Element | @unifin/chart-element | The <unifin-chart> custom element and its registration |
See also
- Getting started - the same objects in a working example.
- Series types - the identifiers behind
SERIES_RENDER_TYPES. - Editions - which entry point exports what.
