
Description
downsample is a JavaScript module that reduces the number of points in a time series before it is drawn on a chart. The goal is to make a long series fast to plot while keeping the shape people need to see. The package exports several methods: ASAP, which smooths out short-term noise to reveal larger deviations, a simple moving average with an adjustable window and slide, and three largest-triangle methods, LTTB, LTOB and LTD. The README describes each method and links to details. The methods accept a plain array of data points or a TypedArray, and a target number of output points, and they return points in an XY format. An advanced API handles custom data types. ASAP and SMA were added in version 1.2.0. The package is installed from npm, and the README includes installation and usage examples and an acknowledgement section that credits the work behind the methods. The source is public on GitHub. It suits developers who build charts or dashboards that show large amounts of time series data, such as sensor readings or metrics.…
Highlights
- ASAP smoothing for large-scale deviations
- Simple moving average with adjustable window
- Largest-triangle methods LTTB, LTOB and LTD
- Works with arrays and TypedArrays
- Advanced API for custom data types
- Installed from npm
Ratings & Reviews
No ratings yet
Be the first to rate downsample.
People also visit
downsample FAQ
What is downsample?
A JavaScript module that reduces the number of points in a time series so it can be drawn quickly without losing its visual shape.
Is it free?
Yes. The source is public on GitHub and listed as open source.
Which methods does it include?
ASAP, SMA, LTTB, LTOB and LTD. ASAP and SMA were added in version 1.2.0.
How do I install it?
It is an npm module. The README shows the install command and usage examples.
What are the best downsample alternatives?
Popular alternatives to downsample include blazeplot, chartkick and frappe-charts. See all downsample alternatives















