uPlot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
uPlot is a tiny, blazing-fast JavaScript charting library for time series data, line, area, bar, and candlestick charts that render 166,000 data points in about 25 milliseconds on a typical laptop.
uPlot is a charting library for JavaScript that draws line charts, area charts, bar charts, and candlestick charts (the OHLC style used in financial data). Its main selling point is speed and small file size. The library weighs about 48 kilobytes, which is roughly five times smaller than Chart.js and twenty times smaller than Plotly, two popular alternatives. It can render a chart with 166,000 data points in about 25 milliseconds on a typical laptop.
The library is built for time series data, meaning data measured over time like server metrics, stock prices, sensor readings, or anything where you have timestamps on one axis and values on the other. It can stream live data updates and refresh at 60 frames per second while using a fraction of the CPU and memory that comparable libraries consume. Benchmarks in the README compare it directly against Chart.js, ECharts, Highcharts, Plotly, and several others, with uPlot consistently at the top for rendering speed and memory use.
Features include multiple data series on the same chart, multiple vertical axes, zoom with automatic rescaling, a cursor that tracks values across series, logarithmic scales, and support for missing data gaps. The library intentionally leaves out animations, stacked series, and automatic data processing, taking the position that those features add visual noise or should be handled before the data reaches the chart.
The API is hook-based and extensible, meaning developers can add custom behavior at specific points in the rendering process. Wrappers exist for React, Vue.js, and Svelte for teams using those frameworks. There is also a Python binding for data science use. The library is MIT licensed and actively maintained. It is aimed at developers who need to display large or frequently updated datasets in a browser without performance problems.
Where it fits
- Build a real-time server metrics dashboard that updates 60 times per second without slowing the browser.
- Add a stock price candlestick chart to a finance app that handles years of historical data without performance problems.
- Display live sensor readings from IoT devices on a lightweight web page that works on low-end hardware.
- Create a cryptocurrency trading interface with multiple data series and zoom on a chart that stays under 50 KB.