Skip to content

Installation

The core has no runtime dependencies.

npm i @lightfin/core

Using React? Add the bindings — @lightfin/core and react are peer dependencies:

npm i @lightfin/react
import { createChart } from '@lightfin/core'
const chart = createChart(document.querySelector('#chart')!, {
volumeVisible: true,
})
chart.addCandlestickSeries().setData(bars)

The container should have a size — the chart fills it and watches for resizes.

Pay only for what you import. The extras live behind their own entry points so they tree-shake out when unused:

ImportWhat it adds
@lightfin/coreChart engine, series, axes, crosshair
@lightfin/core/indicators/*One indicator each, loaded on demand
@lightfin/core/annotationsThe 21 drawing tools
@lightfin/core/annotations/schemaJSON Schema to let an AI draw
@lightfin/core/chromeHUD, legend, toolbars, clock
@lightfin/core/price-linesOrder and position price lines
@lightfin/core/event-tagsEarnings / dividend tags

Indicators are imported one subpath at a time (usually via a dynamic import(), so only the ones you use ship) — see the Indicators reference.

Next: your first chart.