KLineChart

Zero-dependency candle engine with no market-hours rules to switch off for 24/7.

Last updated

From
Free
Licence
Apache-2.0
Self-hosted
Yes
Platforms
Library

What it is

A canvas charting library that does candles and nothing else, which is the point. Version 10.0.3 ships 27 built-in indicators (MA, EMA, SMA, BBI, VOL, MACD, BOLL, KDJ, RSI, BIAS, BRAR, CCI, DMI, CR, PSY, DMA, TRIX, OBV, VR, WR, MTM, EMV, SAR, AO, ROC, PVT, AVP), 16 overlay templates for drawing, six candle rendering modes, and zero runtime dependencies — dependencies is absent from package.json, not merely short.

There is no UI. The source tree is the engine, the panes, the views and the extension points; no toolbar, no menus, no indicator picker, no settings dialogs. That is a design decision rather than an omission, and it is the first thing to understand before choosing it, because the demos you will have seen are somebody's own chrome around this engine.

Liveness, in dates. Version 10.0.3 was released on 27 August 2026 and published to npm the same day; 10.0.2 landed on 5 August and 10.0.0 on 10 July. The last commit on main was 15 September 2026. The repository is not archived and shows 29 open issues alongside 15 open pull requests — two numbers worth keeping apart, because GitHub's REST API reports their sum.

The maintainer is one person. The LICENSE file's appendix reads "Copyright lihu", the sponsor page takes donations, and no company stands behind it. For a dependency you are going to render somebody's account balance through, that is a fact about risk, not about quality.

Pricing

Free, Apache-2.0, with nothing for sale. No hosted tier, no paid edition, no key, no account. The only money page on the site is a sponsorship page that takes donations.

Data & coverage

The library ships no data and no transport. Integration is three calls — setSymbol, setPeriod and setDataLoader — where the data loader you pass supplies getBars for history and pagination and subscribeBar / unsubscribeBar for the live tail. Venues, history depth, granularity and what the chart shows during an exchange outage are entirely determined by whatever you wire in behind those callbacks. If you are still choosing the feed, that decision lives in market data APIs, not here.

Nothing in the library is crypto-specific, and nothing in it is equity-specific either. There are no session or market-hours rules to disable for a 24/7 market, which happens to make it easier to use for crypto than for anything with a closing bell.

Integrations

Plain npm install or a UMD script tag; TypeScript definitions ship in the package. Bundled localisation is en-US and zh-CN only — any other language is a locale you register yourself through the i18n extension point.

The extension model is the reason to pick this over a general plotting package. Indicators and overlays are registered objects with their own calculation and draw functions, so a funding-rate pane or a liquidation-cluster overlay is a registration rather than a fork.

Limitations

The bundle is not the 40 KB the README advertises. The README and the introduction page both say "only 40k under gzip compression". Measured on 10.0.3, the minified UMD build is 229 KB raw and 58 KB gzipped. Still small, and still far smaller than the commercial libraries in this category — but the number in the documentation is a version or two out of date, and this is exactly the field readers compare on.

Sixteen drawing tools, and that is the whole list. Brush, fibonacci line, horizontal and vertical straight lines, rays and segments, parallel straight line, price channel, price line, ray, segment, straight line, simple annotation and simple tag. There is no pitchfork, no Gann fan, no Elliott wave tool, no volume profile. A commercial library in the same category ships forty to fifty. If your users expect a drawing palette they recognise from a terminal, you are building most of it.

KLineChart Pro is effectively dormant. The ready-made chart product built on top of the engine was last published to npm as version 0.1.1 on 23 March 2023, and its last commit was 4 May 2023, while the core moved through two major versions. It is Apache-2.0 like the core, so it is yours to maintain — which is the realistic reading of taking it.

Version 10 is a breaking rewrite. The documentation carries a dedicated v9-to-v10 migration page, and the data integration API described above is new in 10. Any tutorial, fork or Stack Overflow answer written before July 2026 is about a different API surface.

No alerts, no screening, no backtesting, no order entry. It renders a chart. Everything around the chart is yours.

Alternatives

Lightweight Charts occupies the same slot — small, permissively licensed, no UI — and comes from a vendor with a company behind it; KLineChart answers back with more indicators and drawing tools in the box. DXcharts Lite is the other free renderer of this shape, under MPL-2.0 rather than Apache-2.0, which is a different conversation with your legal team. If what you actually want is the chrome as well as the engine — a working drawing palette, a study dialog, saved layouts — then none of the three is the answer and you are looking at a commercial library.

Specs

Interfaces
none
Export
None
Asset classes
Chains
Venues
KYC required
No
Platforms
Library
AI features
None
Capabilities
Charting
Pricing verified
Capabilities verified

Also worth comparing

  • DXcharts LiteThe MPL-2.0 renderer under a broker charting product — candles and axes, no indicators.
  • TradingView Lightweight ChartsApache-2.0 canvas renderer for candles and lines. No indicators, no drawing tools.
  • ChartIQHeavyweight broker charting SDK, domain-locked, priced by an account manager.
  • DXchartsThe paid half of the open core — 100+ indicators, 40+ drawing tools, from $499 a month.
  • Highcharts StockPer-seat commercial charting whose free licence excludes anything you sell.
  • TradingView Advanced ChartsThe chart engine inside half this market — free with visible attribution, not open source.

On these shelves

Background

How this part of the industry works, rather than which product to pick.

  • A token threshold is not a priceSome tools unlock features by requiring you to hold the vendor's token, not pay it. What that really costs, and why it cannot be compared with a monthly fee.

FAQ

Is the English documentation complete, or a stub of the Chinese original?

Complete, as of 19 September 2026. The English tree at klinecharts.com/en-US carries the same twenty pages as the Chinese one, each within a couple of kilobytes of its Chinese counterpart, and five pages checked at random — introduction, quick start, data integration, indicators and the chart API reference — contained no untranslated Chinese at all. This was a real limitation for years and is no longer one.

What licence is KLineChart under?

Apache-2.0, read from the LICENSE file at the root of the default branch, which carries the full Apache text with the appendix line "Copyright lihu". The npm metadata and package.json agree. There is no dual licence and no commercial edition.

Does KLineChart come with a toolbar and an indicator picker?

No. The core is a rendering engine with no UI layer — no toolbar, no menus, no settings dialogs. KLineChart Pro was the ready-made UI built on top of it, and it has not been published since version 0.1.1 in March 2023. If you need chrome around the chart, you are writing it.

Does it supply any market data?

None. You call setSymbol, setPeriod and setDataLoader, and your own getBars and subscribeBar callbacks do the fetching. Where the candles come from, how far back they go and what happens during an exchange outage are all your problem, not the library's.