# Lightweight Charts — High-Performance Financial Charting Library by TradingView > A free, open-source JavaScript library for creating interactive, responsive financial charts with a tiny footprint. Built and maintained by TradingView for embedding professional candlestick, line, area, bar, and histogram charts in any web application. ## Install Save as a script file and run: # Lightweight Charts — High-Performance Financial Charting Library by TradingView ## Quick Use ```bash npm install lightweight-charts ``` ```js import { createChart } from 'lightweight-charts'; const chart = createChart(document.getElementById('chart'), { width: 800, height: 400 }); const series = chart.addCandlestickSeries(); series.setData([ { time: '2024-01-01', open: 100, high: 105, close: 103, low: 98 }, { time: '2024-01-02', open: 103, high: 110, close: 108, low: 101 }, ]); ``` ## Introduction Lightweight Charts is a compact, dependency-free charting library created by TradingView. It renders professional-grade financial charts using the HTML5 Canvas API, delivering smooth performance even with tens of thousands of data points on low-end hardware. ## What Lightweight Charts Does - Renders candlestick, line, area, bar, histogram, and baseline chart types in a single library - Handles time-series data with automatic time axis scaling and formatting - Supports real-time streaming updates for live market data visualization - Provides built-in crosshair, tooltips, and price/time scales with customizable formatting - Runs entirely client-side with no server dependency or external CDN requirement ## Architecture Overview The library is written in TypeScript and renders directly to an HTML5 Canvas element. A compositing layer manages multiple series on a single chart while the price and time scale renderers handle axis labels, gridlines, and coordinate mapping. Data updates trigger incremental redraws rather than full re-renders, keeping CPU usage minimal even during high-frequency streaming scenarios. ## Self-Hosting & Configuration - Install via npm, yarn, or load standalone from a `