Function: lttb()
ts
function lttb(
x,
y,
threshold): {
x: Float64Array;
y: Float64Array;
};Defined in: data/downsample.ts:7
Largest-Triangle-Three-Buckets (LTTB) downsampling — reduce a series to threshold points while preserving its visual shape (peaks/troughs), the standard technique for plotting very long line series. First and last points are always kept.
Parameters
| Parameter | Type |
|---|---|
x | ArrayLike<number> |
y | ArrayLike<number> |
threshold | number |
Returns
ts
{
x: Float64Array;
y: Float64Array;
}x
ts
x: Float64Array;y
ts
y: Float64Array;