Simple yet flexible JavaScript charting library that renders HTML5 charts on the canvas element.
tradingview/lightweight-charts
A small, fast HTML5 canvas library for building interactive financial charts in web pages.
Open-source alternative to:TradingView
- Stars
- 17,784
- Forks
- 2,693
- Open issues
- 132
- Last commit
- yesterday
What is it?
Lightweight Charts is a TypeScript charting library from TradingView that renders interactive financial charts on HTML5 canvas. It is designed to replace static chart images on a web page with interactive versions while adding very little to page size and load time.
Developers create a chart with createChart, add series such as line series, and feed them time-stamped data. The library can be installed from npm, loaded from a CDN as a standalone bundle, or used through prebuilt development and production builds. Its API is also documented with interactive plugin examples, and a plugin catalog covers extensions beyond the built-in features.
The project is licensed under Apache-2.0, and its terms require attribution to TradingView, which can be shown through the attributionLogo chart option. The repository also includes agent skills to help AI coding assistants work with the v5 API.
Key features
- 01Renders interactive financial charts on HTML5 canvas.
- 02Installable via npm or loadable from a CDN as a standalone bundle.
- 03Supports a plugin system for building custom series and primitives.
- 04Ships development and production builds in ES module and IIFE formats.
- 05Provides TypeScript types and an API documented with examples.
Use cases
- Adding interactive price charts to a trading or market data website.
- Replacing static chart images in dashboards to reduce page weight.
- Building custom financial visualizations through the plugin API.
Quick start
- 1
Install the library from npm
npm install lightweight-charts - 2
Import createChart and LineSeries, then create a chart in your page
Things to know
- Focused on displaying financial charts; it is not a general-purpose charting library.
In collections
Topics
FAQ
- What is lightweight-charts?
- A small, fast HTML5 canvas library for building interactive financial charts in web pages. Lightweight Charts is a TypeScript charting library from TradingView that renders interactive financial charts on HTML5 canvas. It is designed to replace static chart images on a web page with interactive versions while adding very little to page size and load time.
- Is lightweight-charts free to use? What license does it have?
- lightweight-charts is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is lightweight-charts still maintained?
- Actively maintained. The last commit to lightweight-charts was on Nov 6, 2026.
- What can I use lightweight-charts for?
- Adding interactive price charts to a trading or market data website. Replacing static chart images in dashboards to reduce page weight. Building custom financial visualizations through the plugin API.
- How do I install lightweight-charts?
- Install the library from npm: npm install lightweight-charts Import createChart and LineSeries, then create a chart in your page
- Where can I get lightweight-charts?
- The source code and installation instructions are on GitHub: https://github.com/tradingview/lightweight-charts
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A React chart library built on D3, offering declarative components for composing SVG charts in React apps.
A visualization intermediate language that lets AI agents turn compact chart specs into polished charts for Vega-Lite, ECharts, Chart.js, Plotly, or Excel.
A typed TypeScript charting grammar for responsive, accessible, server-rendered charts built on granular D3 primitives.
Free, open-source interactive plotting library for .NET that renders charts in GUI apps, consoles, Blazor and notebooks.
A free, open-source JavaScript library for binding data to SVG, Canvas and HTML to build custom, data-driven visualizations.