insightdock::charts::lttb_decimate_indexed

Convenience overload for category-aligned data (x = index).

Synopsis

Declared in <insightdock/decimate.h>
[[visibility]]
std::pair<std::vector<double>, std::vector<std::size_t>>
lttb_decimate_indexed(
    std::vector<double> const& values,
    std::size_t threshold);

Description

Use before passing large datasets to LineChart or AreaChart, whose series values are one-per-category. Returns the decimated values together with the original indices they came from, so the category label list can be sliced to match.

Return Value

Pair of (decimated values, original indices), same length.

Parameters

Name Description
values Input series values (x is the implicit index 0..N-1).
threshold Target point count; see lttb_decimate for no-op rules.

Created with MrDocs