Skip to content

LTTB class

Bases: Decimator

A decimator using the LTTB algorithm.

The LTTB algorithm is an high performance algorithm that significantly reduces the number of data points. It can work very well with time-series data to show trends using only a few data points.

This class can only be used with line charts.

Methods

__init__()

__init__(
    n_out: int,
    threshold: t.Optional[int] = None,
    zoom: t.Optional[bool] = True,
) -> None

Initialize a new LTTB.

Parameters:

Name Type Description Default
n_out int

The maximum number of points that will be displayed after decimation.

required
threshold Optional[int]

The minimum amount of data points before the decimation is applied.

None
zoom Optional[bool]

set to True to reapply the decimation when zoom or re-layout events are triggered.

True