mrkeyoor.com_
Tue 01 Sept 17:45 UTC
Webevaluationupdated 27 Aug 2026

lightweight-charts review

Lightweight Charts is a browser library for drawing interactive financial and time-series charts on HTML canvas. You supply the prices and updates; it handles candlesticks, lines, scales, panes, crosshairs, and extension points without bringing in a full trading terminal.

+51 / 4dstars / 7d
Verdict

Our Lightweight Charts run built in 17 seconds and passed all 144 tests in 9 seconds, with 0 known npm vulnerabilities, so it is an easy recommendation for browser-based financial charts. Use it when you own the data pipeline and want a focused rendering layer. Choose a broader library for mixed analytics dashboards, or a commercial charting product when indicators, drawing tools, and market data must arrive ready-made.

We ran it

Lab card: what happened when we ran lightweight-chartsScreenshot of lightweight-charts (www.tradingview.com/lightweight-charts)
Install✓ · 50s825 packages · 1475 MB
Build✓ · 17s
Tests✓ · 9s144 passed · 0 failed of 144 (node:test)
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo1534 files~100,725 lines of source · 6.4 MB · 4 CI workflows · tests dir

Answers from our run

Does lightweight-charts build from source?

Dependencies installed in 50 seconds (825 packages), and the build succeeded in 17 seconds. We cloned commit 65e78a0 into a clean Debian container with 3 CPUs and no project-specific setup.

Do lightweight-charts's tests pass?

Yes: 144 of 144 passed when we ran the project's own test command (node:test). Some failures need services or credentials a bare container does not have.

Does lightweight-charts have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use lightweight-charts?

Server-rendered chart generation: the official docs call it a client-side library and say it is not designed for Node.js.

What are the alternatives to lightweight-charts?

Apache ECharts, Chart.js, ApexCharts.js. Our Lightweight Charts run built in 17 seconds and passed all 144 tests in 9 seconds, with 0 known npm vulnerabilities, so it is an easy recommendation for browser-based financial charts.

Setup5/5Install, 17-second build, and all 144 tests passed
Docs5/5Versioned API, tutorials, migrations, plugins, and wrappers
Community5/517,090 stars and active August 2026 maintenance
Maturity5/5v5.2.1, clean audit, passing tests, and careful releases

Who it’s for

Web teams building market, portfolio, or trading interfaces with their own data feed.
TypeScript developers who want typed series and chart APIs with npm and CDN builds.
Products that need frequent last-bar updates without replacing the full dataset.
Plugin authors prepared to implement custom indicators, annotations, or drawing tools on canvas.

Who it’s NOT for

Server-rendered chart generation: the official docs call it a client-side library and say it is not designed for Node.js.
Teams that need prices, indicators, order entry, or drawing tools supplied as a finished terminal: the repository provides rendering and plugin hooks, not those services.
Sites unwilling to credit TradingView: the license instructions require the NOTICE attribution and a TradingView link on a public page.
Browser targets below ES2020 without a transpilation step.
Mobile teams expecting native rendering: the iOS and Android wrappers render the JavaScript chart in a web view, with separate platform requirements.
Applications staying on v4 APIs: v5 changed series creation, markers, watermarks, and plugin type names.

Setup reality

Our npm install succeeded in 50 seconds, adding 825 packages and occupying 1,475 MB. The build passed in 17 seconds. Tests passed in 9 seconds, with all 144 node:test cases passing and 0 failing; npm audit reported 0 known vulnerabilities.

Using the package is much smaller in concept: install it from npm or load the standalone browser build, create a chart, add a series, and provide data. It needs no credentials or backend, but it also supplies no market data. Public products must add the required TradingView attribution.

The runtime targets ES2020 browsers and does not support server-side Node rendering. Source development needs Node.js 22.3 or newer, and documentation linting needs installs in both the root and website folders. PNG-style server output needs another tool because this library draws into a live browser canvas.

Six built-in series cover the financial chart basics

Lightweight Charts takes timestamped or business-day data and draws it in a browser canvas. The six core series are area, bar, baseline, candlestick, histogram, and line. A chart supplies time and price scales, scrolling, zooming, a crosshair, multiple panes, and APIs for replacing a dataset or appending the latest point. That is enough for price histories, portfolios, yield curves, option displays, and compact market widgets without adopting a complete trading interface.

The boundary is important. Lightweight Charts does not fetch quotes, normalize exchange calendars, calculate indicators, place orders, or persist drawings. Your application owns those jobs and calls setData for an initial series, then update for a changed last bar or a new one. The docs warn against repeatedly calling setData for updates because it replaces the entire series and can hurt performance. This library earns its name by staying on the drawing side of the line.

What happened when we ran it

Our sandbox installed 825 npm packages in 50 seconds, leaving 1,475 MB on disk. The project built successfully in 17 seconds. We then ran its tests in 9 seconds: node:test reported 144 passed and 0 failed out of 144. Npm audit found 0 known vulnerabilities across the installed dependency tree, with 0 critical, high, moderate, or low findings.

We tested commit 65e78a0 in an unprivileged Node 22 container with 3 CPUs and 8 GB of RAM. The checkout held 1,534 files, about 100,725 lines of source, and 6.4 MB before installation. It has 4 CI workflows and a tests directory, but no Dockerfile, which fits a browser package rather than a service. The 1,475 MB development tree is heavy next to the small checkout, yet consumers bundle the library output, not the repository's compilers, docs, and test tools.

ES2020 browsers work, while server rendering does not

The first chart needs a container, createChart, one imported series type, and data. Npm supplies ES modules and TypeScript declarations; unpkg supplies standalone IIFE builds under window.LightweightCharts. Production and development variants are published both with and without bundled dependencies. No account or API key is needed. The browser must support ES2020, or the host build needs to transpile the package for older targets.

Server-side Node use is explicitly unsupported. A Next.js or similar application should load chart code on the client after a real DOM container exists. If the product needs PDFs, email images, or social cards generated without a browser, plan a capture layer or another renderer. Mobile wrappers do not change that architecture: iOS and Android place the chart inside a web view. Current iOS guidance requires iOS 15, Xcode 16, and Swift 6; Android starts at SDK 23 with an ES2020-capable WebView.

Version 5 trades old convenience methods for smaller bundles

The v5 API replaces calls such as addLineSeries with addSeries(LineSeries), requiring each series type to be imported. Markers moved into a separate primitive, and watermarks became pane plugins. Plugin interface names also changed. These edits improve tree shaking because applications no longer carry marker or watermark code they do not use, but upgrading an established v4 wrapper is source work rather than a package-number bump.

TradingView has a direct migration guide with before-and-after code for all 6 series types, markers, watermarks, and renamed plugin interfaces. The repository also ships an agent skill for v5 conventions that supports Claude Code and Codex. That may reduce stale generated snippets, though it should not replace the versioned API reference. The documentation itself caught and fixed examples that called priceScale() without the required scale ID, a reminder that copied examples still need tests in the consuming application.

Plugins are the route to indicators and drawing tools

Custom series can define their own data structure and canvas renderer while retaining the standard series API. Series primitives attach annotations or drawing behavior to one series and may render on the chart or its scales. Pane primitives cover chart-wide visuals such as watermarks, but the docs say they cannot draw on price or time scales. The repository includes interactive examples for heatmaps, alerts, tooltips, and accessibility.

This extension model is capable and low-level. A team asking for Fibonacci tools, order lines, custom indicators, or domain-specific annotations should inspect the plugin examples before estimating the work. Open issue 2087 still asks for a trade-management plugin example, which is a useful signal about where the finished library stops. Release v5.2.1 added a packaged accessibility helper, so keyboard navigation, ARIA markup, and screen-reader announcements now have a closer starting point than a blank primitive.

Attribution is mandatory even under Apache 2.0

The code uses Apache 2.0, but the README and getting-started guide require products to identify TradingView as the creator. A public website or mobile application must carry the NOTICE attribution and a link to TradingView. The chart has an attributionLogo option that can satisfy the link part. Legal review should treat this as a deployment requirement, especially for white-label dashboards where visible third-party credit may be unacceptable.

GitHub showed 17,090 stars, 126 combined issues and pull requests, and a last push on August 21, 2026. Release v5.2.1 arrived August 12 with hover performance work, marker fixes, an accessibility plugin, and the agent skill. The clean 144-test run and 0-vulnerability audit support a high maturity score. Lightweight Charts is the focused choice when canvas financial rendering is the problem. It is a poor substitute for the data, analytics, and workflow layers that surround a real trading product.

Alternatives

ProjectWhat it isPick it when
Apache EChartsA broad browser visualization library with many chart families and interaction options.pick this instead when financial charts are one part of a wider dashboard with maps, graphs, and statistical plots.
Chart.jsA general HTML canvas chart library with a small, familiar API.pick this instead when ordinary business charts matter more than trading-specific time and price behavior.
ApexCharts.jsAn SVG chart library with common dashboard and financial series types.pick this instead when SVG output and built-in dashboard chart variety matter more than a canvas-first financial core.

What people are saying

  1. [github-trending] tradingview/lightweight-charts

Sources

  1. Lightweight Charts README
  2. Lightweight Charts getting started
  3. Version 4 to 5 migration guide
  4. Lightweight Charts plugin overview
  5. Trade management plugin request
  6. Lightweight Charts v5.2.1 release

More web reviews

axios · super-productivity · Graphite · fastify · tabler · go-zero · the whole board →