Lightweight Charts

Embed fast and lightweight interactive financial charts in web applications.

Embed fast and lightweight interactive financial charts in web applications.

The gist

Lightweight Charts is an open-source HTML5 charting library created by TradingView. It enables developers to display interactive financial data visualizations on web pages. The library is designed to be extremely small and fast, providing an efficient alternative to using static image charts, especially when multiple charts are needed on a single page, without compromising performance or loading speed.

What it does

  • Render fast, interactive financial charts using HTML5 canvas.
  • Display time-series data with various chart types like line series.
  • Customize chart appearance and behavior with a rich set of options.
  • Extend functionality by building and integrating custom plugins.
  • Integrate into web projects via npm or a standalone CDN script.

How it works

As a JavaScript library, Lightweight Charts is installed via npm or loaded from a CDN. Developers import the createChart function, attach it to an HTML element, and then feed it time-series data as a JavaScript array of objects. The library renders interactive visualizations onto an HTML5 canvas element. It is open-source and free to use under the Apache 2.0 license, with an attribution requirement.

Best for

This library is ideal for web developers building financial technology applications, trading platforms, or data dashboards who need to embed performant, interactive charts with a minimal footprint.

Watch out for

The Apache 2.0 license includes a mandatory attribution clause. You must include a notice and a link back to TradingView on the page where the chart is displayed.