Open source Apache-2.0 v0.1.0

    Chartist Lite, a chart that runs live.

    An open-source chart library for the web. The chart below is the library itself, streaming from the exchange.

    StartingBTC-USD–Prices are indicative, not advice.

    • 16chart types
    • 85indicators
    • 53drawing tools
    • 33.6 KBgzip core, 0 dependencies
    01The workspace

    A whole workspace in one call.

    One tag
    12parts of a trading workspace, ready to use
    <chartist-terminal live>
    • Symbol searchFind a market by its name
    • Intervals1m to 1D, switched in place
    • Chart typesAll sixteen, candles to Renko
    • Indicators dialog85, searchable, by family
    • CompareOther markets as lines, in percent
    • AlertsA line on the price that fires on a cross
    • Drawing tools15 on the rail, 53 on request
    • UndoUndo and redo every change
    • ScreenshotSaves the chart as a PNG
    • Full screenThe chart alone, edge to edge
    • Range keys1D 5D 1M 3M 6M YTD 1Y 5Y All
    • Live cryptoStraight from the exchange
    02Indicators and drawings

    85 indicators, 53 drawing tools.

    Trend, 20 indicators

    2 on the chart now

    The workbench starts as it comes into view.

    53drawing tools in 7 groups. The basic set of 15 is the one the live chart above offers; undo, single-key shortcuts and a versioned JSON save come with all of them.
    • 10Lines
    • 8Channels and pitchforks
    • 9Fibonacci and Gann
    • 7Shapes
    • 6Measures
    • 2Long and short positions
    • 11Notes
    03Chart types

    Sixteen chart types, one library.

    04Live data

    From the exchange to the chart, direct.

    The visitor's browserYour page, with the chart on it
    1. 1CoinbaseTried first
    2. 2BinanceIf the history does not load. Quoted in USDT
    3. 3KrakenThen Kraken, its newest 720 bars
    Your server: not needed. History requests carry no cookies.
    • Once per frameTrades stream in as fast as they come and are painted once per frame.
    • Reconnects by itselfIt waits 1 s, doubling up to 30 s, then reloads history to fill the gap.
    • Pauses when hiddenA hidden tab closes the stream until the visitor comes back.
    • Older bars on demandScroll to the left edge and a page of older bars loads (not on Kraken).
    • Your own providerWrite a provider and the same call feeds any market you have data for.
    It says where it stands
    • connecting
    • live
    • reconnecting
    • offline
    • error
    05Speed

    Fast enough for a 120 Hz screen.

    Worst p95 frame cost
    5.1 msof the 8.33 ms one frame at 120 Hz allows

    0 of 116 scenarios over 8.33 ms, and 0 over 6.94 ms.

    By gesture, worst p95 1,000 10,000 100,000 bars
    • Crosshair1.2 ms
    • Pan0.6 ms
    • Wheel zoom4.0 ms
    • Live tick0.7 ms
    • Live tick, whole series in view5.1 ms
    • Drag a drawing0.5 ms
    • Live trades, 20 a frame0.5 ms

    Each track is one 8.33 ms frame.

    • 01One paint a frameEvery change is applied at once and painted by the next animation frame; several changes in one frame become one paint.
    • 02No 60 Hz capNo timer or throttle in input, kinetic scroll or the crosshair fade. Motion is timed in milliseconds, so it runs the same at 60, 120 or 144 Hz.
    • 03The crosshair repaints one layerA crosshair move redraws only the overlay canvas; the series are not drawn again.
    • 04Trades fold into one paintHowever fast trades arrive, the live entry folds them into bars and paints once per frame.

    How it was measured: the cost of one frame of the library's code (input handlers, its frame callbacks and the legend's layout), 200 frames per scenario after 20 warm-up frames, on an Intel Xeon at 2.30 GHz in headless Chromium 157, 22 November 2026. Not a frame rate on a real 120 Hz panel, and no GPU time.

    Run it on your device

    Press run: this page draws 100,000 made-up bars with the core build, then pans and zooms across them for 120 frames, timing the library's drawing on every one. Nothing leaves this tab.

    – msyour p95 frame cost
    5.1 mspublished worst p95
    – msyour median frame
    – msto load 100,000 bars and draw once

    Yours is one gesture on one device, timed around the library's paint call; the published figure is the worst of 116 scenarios on the author's machine. Both are the frame cost of the library's code, not a frame rate.

    Loading the core build

    06Size

    Light, part by part.

    The core, gzip
    33.6 KBwith 0 runtime dependencies

    The chart, the six series, price lines, markers, themes, the legend and the keyboard. Written from scratch; the build fails if the core goes over its budget.

    Each part, gzip
    • CoreThe chart, six series, legend, keyboard33.6 KB
    • DrawingsAll 53 tools and their rail32.6 KB
    • ExtrasTooltips, alerts, compare, replay29.8 KB
    • IndicatorsAll 85 indicators21.9 KB
    • Chart typesRenko, Kagi and the other builders13.1 KB
    • LiveCoinbase, Binance and Kraken6.4 KB
    • 28.3 KBCore only: one chart of candles
    • 30.1 KBCandles, two averages and RSI
    • 137.2 KBThe whole workspace, one script tag

    The core and the three pages are the README's figures (bundled with esbuild, gzip level 9). The other parts were measured on this site's copies of the script-tag files, gzip level 9.

    07More in the box

    Tooltips, compare, replay, alerts and more.

    • Floating tooltipMove the pointer over the chart: open, high, low, close and the change follow it.
    • Compare in percentTwo more lines on a percent axis, re-based as you pan and zoom.
    • Bar replayHistory up to one bar, then forward bar by bar at 1x to 10x.
    • Price alertsA line on the price that fires once on a cross. Drag it, or add one with the plus by the axis.
    • Panes and scalesRSI in its own pane, volume on an overlay scale, a left axis, log or percent.
    • Custom series and pluginsPrice lines, markers, your own primitives, and four custom series to copy.
    • Embed it your wayThe chartist-chart element, an ES module, React, or an iframe for sites with no scripts.
    • Strict CSP, hostile CSSWorks under style-src 'self' and on pages with hostile global CSS (checked in Chromium).
    • Watermark and session breaksA watermark, a go-to-latest button, a range switcher and a mark at each new day.
    • Coming from Lightweight ChartscreateChart, addSeries, setData and update keep the same names, so code moves over.
    08Themes, time, keyboard

    Any theme, any time zone, any keyboard.

    The chart starts as it comes into view.

    Light, dark or autoAuto follows the visitor's system setting; colours can be overridden, and the theme can switch at runtime. Switch this page's theme and every chart on it follows.
    Exchange time, no gapsLabels read in any IANA zone with daylight saving handled, and nights and weekends take no space on the axis.
    Inspect with the keyboardClick the chart, then:
    • EnterStart stepping through bars
    • ←→One bar (Shift: ten)
    • +−Zoom in and out
    • HomeEndFirst or last bar
    • EscStop inspecting
    Each bar is announced, for example: "Thu 18 Apr 2024; DEMO: open 98.43, high 100.32, low 97.41, close 99.96". Not yet checked with a screen reader.
    09The code

    Three ways in. The tag is the shortest.

    The tag, createWidget from JavaScript, or React. Change the market or the interval on the live chart and the code follows.

    <script src="chartist-lite.terminal.iife.min.js"></script> <chartist-terminal  live  symbol="BTC-USD"  interval="1m"  chart-type="candles"  theme="auto"  drawings  height="620"></chartist-terminal>
    10Get it

    Three steps to your own copy.

    Build it from the repository, then copy the terminal file and its extras file from dist/ to your site.

    Terminal
    git clone https://github.com/MrChartist/Lite_Charts.git && cd Lite_Chartsnpm cinpm run build
    • Version 0.1.0
    • Not on npm yet
    • Tested in Chromium only
    • 596 tests passing
    11Questions

    The questions to ask before you build.

    Before you build
    6straight answers,
    from the docs
    • Licence
    • npm
    • Live data
    • React
    • Browsers
    • Your own data

    Something else? Ask on the repository.

    Open an issue

    Read the code. Build on it.

    Chartist Lite is open source under Apache-2.0, with no dependencies. Clone it, build it and put the live chart on your own page.

    Privacy settings

    Essential sign-in storage and your saved preferences stay enabled. Analytics is optional, and you can change your choice anytime.

    Turning analytics off clears our analytics cookies and local assistant metrics. The page reloads to stop a previously loaded analytics service. Your account and learning progress stay saved.

    Read the Privacy Policy