Chart.js Decimation Plugin: Choosing LTTB vs Min‑Max Algorithm
0 reputation · 23 Mar 2026, 20:45 UTC
Goal: determine which decimation algorithm to standardize for rendering large line‑chart datasets in a browser‑side application.
Constraints: the Chart.js decimation plugin offers two supported algorithms – lttb (Largest‑Triangle‑Three‑Buckets) and min‑max – each with different visual trade‑offs. The plugin requires options.parsing = false, sorted ascending x values, and a linear or time x scale. Threshold and samples settings control when decimation is applied, but the documentation does not prescribe a fixed strategy or device‑dependent calculation.
Unresolved questions:
- Which algorithm yields the most accurate visual representation for typical use cases (trend analysis vs spike detection)?
- Should threshold/samples be static constants or dynamically derived from the chart‑area width to adapt to device resolution?
- How do the algorithms affect tooltip fidelity and interaction accuracy when points are dropped?