Reducing a dense time series to fit a chart usually means throwing points away, and the crude ways of doing it - keeping every Nth point, or averaging - distort the shape of the data. Largest-triangle-three-buckets, universally shortened to LTTB, is a downsampling algorithm designed to do better: it chooses which points to keep based on how much each one contributes to the visual shape of the line. The effect is a downsampled chart that looks strikingly like the full-resolution original at a tiny fraction of the points, because the algorithm deliberately keeps the points that matter to the eye.
LTTB Downsampling in one line: Largest-triangle-three-buckets, or LTTB, is a downsampling algorithm that reduces a time series to a target number of points while preserving its visual shape. It divides the data into buckets and, from each, selects the one point that forms the largest triangle with its neighbors, keeping the visually significant points and discarding the redundant ones.
The simplest ways to shrink a series to fit a chart all sacrifice fidelity in visible ways. Keeping every Nth point - plain decimation - is fast but blind: it keeps whatever points happen to land on the interval and drops everything between, so a peak that falls between two kept points simply vanishes and the line jumps straight past where it should have risen. The chart is not just smoothed; it can be shaped entirely differently from the data, with features appearing or disappearing according to nothing more than sample alignment.
Averaging into buckets avoids dropping features quite so arbitrarily, but it flattens them. Each bucket becomes its mean, so peaks are pulled down toward the surrounding level and the characteristic sharpness of the signal is lost. A series of tall, thin spikes becomes a gentle wave, and while the general trend survives, the very features that make the data interesting are muted. Averaging answers where the data roughly sat but not what shape it traced.
The common failing is that neither method asks the right question. Both reduce the data by a mechanical rule - every Nth, or the mean of each bucket - that has nothing to do with how the resulting line will look. What a person wants from a downsampled chart is a picture that looks like the full data would if you could draw all of it. Getting that requires choosing points by their contribution to the visible shape, which is precisely the idea LTTB is built around.
LTTB starts by dividing the data into roughly equal buckets, one per point in the target output, so if you want a few hundred points out of a million, you get a few hundred buckets. The first and last points of the whole series are always kept as fixed anchors. Then the algorithm walks bucket by bucket, choosing exactly one point from each to represent it, and the cleverness is entirely in how it makes that choice.
For each bucket, LTTB considers the point already selected from the previous bucket on one side, and a representative of the next bucket on the other. For every candidate point in the current bucket, it forms a triangle whose three corners are that previous point, the candidate, and the next-bucket representative, and it computes the area of that triangle. It then keeps the candidate that produces the largest triangle. A large triangle means the point sits far from the straight line its neighbors would otherwise draw, which is exactly the definition of a point that carries visual information - a peak, a valley, a sharp turn.
By always choosing the most area-contributing point per bucket, LTTB naturally retains the extremes and inflection points that define the line's silhouette while discarding the run of nearly-collinear points along the flat stretches, which add pixels but no information. The result is that a downsampled series traces the same visual envelope as the original: the peaks stay tall, the valleys stay deep, and the flats stay flat, all with a point count small enough to render instantly. The algorithm optimizes for the eye rather than for a mechanical rule.
For a cloud SCADA platform rendering trends over long spans of high-resolution data, LTTB is a way to keep charts both fast and faithful. When Merobix draws a week or a month of a tag, sending the full raw series to a browser would be slow, but a crude reduction would misrepresent the process. Applying LTTB to select a few hundred visually significant points yields a chart that loads quickly and still traces the true shape of the data, so an engineer reading it sees the real peaks and turns rather than an averaged approximation.
It is useful to place LTTB alongside min-max decimation, since both fight the same battle from different angles. Min-max decimation guarantees that the absolute highest and lowest values in each pixel column are drawn, which is ideal when the single most important thing is never missing a spike. LTTB instead optimizes the overall visual shape of a line, keeping the sequence of points that best reproduces the curve. One prioritizes worst-case extremes per column; the other prioritizes faithful silhouette, and a platform may favor each in different views.
In every case, LTTB is a display-time technique layered over the full-resolution history rather than a change to what is stored. The historian retains all its samples for numeric queries and aggregates; LTTB simply decides which subset to draw for a given range and chart width. For a monitoring system whose users make decisions by looking at trends, an algorithm that reduces millions of points to a few hundred without distorting the shape is what lets long-range charts stay both responsive and trustworthy.
LTTB stands for largest-triangle-three-buckets. It is a downsampling algorithm that reduces a dense time series to a target number of points while preserving its visual shape. It divides the data into buckets and, from each, keeps the single point that forms the largest triangle with its chosen neighbors, which selects the points that carry the most visual information.
Keeping every Nth point drops whatever falls between the kept samples, so peaks can vanish according to sample alignment, and averaging flattens peaks toward the surrounding level. Both reduce data by a mechanical rule unrelated to how the line will look. LTTB instead chooses points by their contribution to the visible shape, so the downsampled chart traces the same silhouette as the full data.
No. LTTB is a display-time technique that decides which subset of points to draw for a given time range and chart width. The historian keeps all its raw samples for numeric queries and aggregates, and LTTB only governs how the data is reduced for a visual so the chart renders fast without distorting the shape of the trend.
Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.