uPlot
Tiny, extremely fast Canvas-based chart for time series, lines, areas, OHLC and bars
Repository Health
Technical Analysis
uPlot is a Canvas 2D-based charting library purpose-built for time series, line, area, OHLC, and bar charts, optimized above all else for render speed and memory footprint. At roughly 50KB minified, it can cold-start an interactive chart with over 166,000 data points in 25ms and scale linearly at around 100,000 points per millisecond after that, without relying on WebGL or WASM (both of which carry higher startup cost and larger code size).
Its headline use case is live-streaming data at 60fps: benchmarks in the project’s README show it updating 3,600 points per frame using roughly a quarter of the CPU and RAM that comparable Canvas-based libraries like Chart.js and ECharts require for the same workload. This makes it a common choice for dashboards, monitoring tools, and financial charting where large or fast-updating datasets need to stay smooth and responsive.
What You Get
- A ~50KB minified, dependency-free charting engine for time series, line, area, OHLC, and bar charts
- Cold-start rendering of 166,000+ points in ~25ms and near-linear scaling to millions of points
- Smooth 60fps live-streaming updates with a fraction of the CPU/memory cost of Chart.js or ECharts
- Fine-grained cursor, zoom, and legend APIs for building custom interactive chart UIs
- A plugin-friendly architecture (
src/paths/) for custom path renderers and chart types
Common Use Cases
- Real-time monitoring dashboards streaming metrics at high frequency
- Financial/trading charts rendering OHLC and volume data over long time ranges
- Embedding lightweight charts in performance-sensitive or bundle-size-constrained web apps
- Data exploration tools that need to plot very large time series without lag
Under The Hood
Architecture - The entire chart engine lives mainly in src/uPlot.js (~3,500 lines), a single cohesive module that manages scales, series, axes, cursor interaction, and the render loop against a raw Canvas 2D context — there’s no virtual DOM or component tree, just direct imperative drawing calls driven by an options object (src/opts.js). Path rendering for different series types (line, bars, spline) is factored out into src/paths/, and src/sync.js implements cross-chart cursor/zoom synchronization for multi-chart dashboards.
Tech Stack - Zero-dependency vanilla JavaScript (ESM/CJS dual build via Rollup, rollup.config.js), shipping hand-written TypeScript type declarations (dist/uPlot.d.ts) rather than being authored in TypeScript itself. The build produces ESM, CJS, and IIFE bundles for direct <script> tag use.
Code Quality - There is no automated test suite; the test npm script is a placeholder that exits with an error, and correctness is instead validated through the extensive demos/ and bench/ directories, which double as manual regression checks and live performance benchmarks. Code favors terse, performance-oriented style (short variable names, manual DOM/Canvas manipulation) over verbose abstractions, which is a deliberate tradeoff for a library whose primary value proposition is raw speed.
API Design - The core API is a single new uPlot(opts, data, target) constructor with a large but well-documented opts object (scales, series, axes, cursor); this keeps integration boilerplate low for basic charts but means mastering the full feature set (sync, plugins, custom paths) requires reading the fairly extensive docs, since there’s no framework-idiomatic component API of its own (community wrappers exist for React/Vue/Svelte).
Used by 6 apps in this directory
ai-toolkit
AI Development · AI Design Tools
An all-in-one open-source training suite for finetuning diffusion models—FLUX, SDXL, Wan video, and audio—on consumer GPU hardware via CLI or web UI.
Convex Backend
Developer Tools · Databases
Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.
Coroot
Analytics · Monitoring
eBPF-powered observability with AI root cause analysis — zero code changes required, full-stack visibility out of the box.
Grafana
Monitoring · Analytics
The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.
HyperDX
Developer Tools · Analytics · Monitoring
Open source observability platform that unifies logs, traces, metrics, and session replays on ClickHouse — now the core of ClickStack.
SigNoz
Monitoring · Analytics
Self-host your entire observability stack — logs, metrics, traces, and LLM monitoring — in one OpenTelemetry-native platform, without the Datadog bill.