Skip to content

WebGL2 · TypeScript · Apache-2.0

Next gen
charting library

Financial charts that stay smooth with a million candles. A headless engine you can drive from any UI, plus an optional toolkit when you want one.

RESTWebSocketCSV your app WebGL2 renderer @chart-on/core series · drawings uitathemingindicators

Developer experience

A chart library for
developers and agents

Small, typed and predictable: options are plain objects, every subscription returns its own unsubscribe, and nothing hides in global state. Code that people and coding agents read the same way.

  • Candles, lines, histograms, heatmaps and custom series.
  • Indicators, drawing tools and multi-pane layouts.
  • A test kit that runs charts under Node: installTestEnvironment.
  • Wrappers for the common component frameworks.
Core concepts
import { createChart } from '@chart-on/core'; const chart = createChart(document.getElementById('chart')!);chart.addCandles({ title: 'BTC/USD' }).setData(bars);chart.fitContent();

CPU per pan frame

0.05ms

With 1,000,000 candles loaded. The rest of a 16.7 ms frame is left to your app.

to load 1M candles

104ms

setData of one million bars. 100,000 bars take 10.5 ms.

gzip for a live chart

92.4KiB

createChart plus a REST data source, tree-shaken. Zero runtime dependencies.

to zoom four linked charts

0.13ms

Four charts of 100,000 candles each, kept in sync on every frame.

Speed

Faster than you can see

One million candles, panning on every frame. The numbers are measured live in your browser.

FPS – CPU ms – GPU ms –
Measured live in your browser on every frame: FPS from the chart's own frame time, CPU and GPU ms from its render statistics. Your hardware sets them, so they differ between machines.

Generating 1,000,000 candles…

Performance guide

Agent ready

Docs your coding agent can read

Pick what you ship

Headless core, optional everything

Every feature beyond a basic chart is an opt-in export.

  • @chart-on/core
  • @chart-on/ui
  • @chart-on/indicators
  • @chart-on/ta
  • @chart-on/locales
  • @chart-on/react
  • @chart-on/vue
  • @chart-on/svelte

Drawings

Drawing tools

Trend lines, Fibonacci, shapes and text, plus a plain-object contract for your own.

Indicators

Indicators as pure functions

Declared inputs and outputs, O(1) live updates, panes that follow the main series.

Theming

Every token is yours

Built-in colour presets, CSS variables for the UI and a theme object for the canvas.

Order flow

See the liquidity, not just the bars

Resting size over time as a heatmap, the live book beside the price axis, and footprints and profiles from your trades. Simulated here; feed it any order book.

  • Liquidity heatmap
  • Depth lane
  • Footprint
  • Volume profile
  • TPO profile
  • Large trades
Depth lane
Simulated

Make it yours

Your indicators, your trades, your brand

Write indicators as pure functions, show your users' trades, mark zones your code finds, draw your own series and restyle every colour. Toggle a layer to see its code.

import { ema } from '@chart-on/ta'; const regime: IndicatorDef<{ length: number }> = {  id: 'trend-regime',  name: 'Trend regime',  placement: 'overlay',  inputs: [{ id: 'length', type: 'number', default: 21, min: 2 }],  plots: [    // Each bar takes a palette colour from the 'trend' output.    { id: 'avg', type: 'line', lineWidth: 2, palette: ['#22a06b', '#e5484d', '#8b93a7'], colorOutput: 'trend', lastValueLabel: false },    { id: 'tint', type: 'background', palette: ['rgba(34, 160, 107, 0.08)', 'rgba(229, 72, 77, 0.08)'] },  ],  compute(src, { length }) {    const avg = ema(src.close, length);    // 0 rising, 1 falling, 2 flat (also the first 8 bars): the change over 8 bars against 0.6% of the price.    const trend = avg.map((v, i) => {      const change = (v - avg[i - 8]) / v;      return Number.isNaN(change) || Math.abs(change) < 0.006 ? 2 : Number(change < 0);    });    return { avg, trend, tint: trend };  },}; chart.indicators.add(regime);
Write an indicator

Open source

Build the chart
your traders deserve

Free and open source under Apache-2.0. Read the code, open an issue or send a pull request: every package, the docs and this site live in one repository.

Attribution

Credit charton

Credit is optional and much appreciated. Keep the small logo the chart shows by default, or put a link near the chart so others can find the project.

GitHub

Star the repository

A star helps other developers find charton and tells us the work is useful.

Sponsors

Back the project

charton is free and built in the open.