Financial charts,
without the weight.

A dependency-free charting library with professional-grade candlesticks, indicators, drawing tools and live data — while staying small and easy to wire to any source.

npm i @lightfin/core

A real @lightfin/core chart with its full chrome, streaming live BTC/USDT from Binance.

Professional-grade charting

Candlesticks, bars, line and area — switchable in place. Smooth pan/zoom, crosshair, volume sub-pane and a current-price line out of the box.

Indicators built in, or build your own

SMA, EMA, Bollinger, RSI, MACD, ATR, Stochastic and Volume MA ship out of the box, each on its own resizable pane, plus a tree-shakeable indicator framework for authoring custom ones.

25 drawing tools

Trend lines, channels, Fibonacci, Gann Fan, Elliott waves, Head and Shoulders, shapes, and measurements, with undo/redo and per-drawing styles.

Live data, any source

Bars in, chart out. Attach a DataSource for history backfill and a live stream; follow-mode keeps the latest candle in view.

React bindings

A thin <LightfinChart> wrapper plus a useChartEffect hook wire features imperatively onto the chart while the core stays framework-free.

Zero dependencies

Not one transitive package — no supply-chain surface to audit, no CVEs to chase. The whole library is yours to review, which risk and compliance teams tend to ask about.

Small and dependency-free

Our chart lazily loads optional features like toolbars, annotations and indicators, so you only pay for what you use.

Core 14 kB
Core + chrome + all indicators & annotations 43 kB
Other full-featured charting libraries 2 MB+

Lightfin sizes are brotli-compressed and enforced in CI. The comparison bar is capped — a 2 MB bundle is roughly 47× the full Lightfin build.

Built to stay at 60fps

Optimized draw calls, carefully structured columnar data to minimise GC, and buttery gestures — right up to half a million candles.

500k candles
panned & zoomed in real time
60 fps
gesture-driven pan, zoom & crosshair

Batched draw calls

Each series and indicator collapses to a handful of Path2D fills and strokes per frame — up/down candles bucketed by color, a whole line plot in one stroke.

Columnar data, minimal GC

Bars live in parallel typed-array columns — a gap-buffered store, not an array of objects — so appends, backfill and redraws barely touch the garbage collector.

One frame, one paint

A single requestAnimationFrame-batched scheduler coalesces every invalidation into one render pass, drawn on layered canvases at device-pixel sharpness.

Smooth at any scale

O(1) viewport slicing keeps pan, zoom and live follow-mode fluid whether you are showing 500 candles or 500,000.

Bars in, chart out.

The core knows nothing about your data or framework. Create a chart, add a series, hand it bars. Reach for @lightfin/react, indicators, drawing tools or a live DataSource only when you need them.

Read the docs
import { createChart } from '@lightfin/core'

const chart = createChart(document.querySelector('#chart'), {
  volumeVisible: true,
})
chart.addCandlestickSeries().setData(bars)