insightdock::charts::detail::make_runs

Splits a series into drawable runs according to a GapPolicy.

Synopsis

Declared in <insightdock/detail/series_runs.h>
template<
    class ValueFn,
    class XFn,
    class YFn>
std::vector<PointRun>
make_runs(
    std::size_t n,
    GapPolicy policy,
    ValueFn value,
    XFn x_pixel,
    YFn y_pixel);

Description

- Zero: every position yields a point (non-finite values become 0); one run. - Gap: a non-finite value ends the current run; later points start a new one. - Interpolate: non-finite values are skipped; neighbours stay connected in one run.

Return Value

A standard container which offers fixed time access to individual elements in any order.

Parameters

Name Description
n Number of positions (categories or x-values).
value double value(std::size_t i) — the sample, or NaN if the series is too short.
x_pixel float x_pixel(std::size_t i) — pixel x of position i.
y_pixel float y_pixel(double v) — maps a value to pixel y.
policy How a missing value (NaN, Inf, or a series shorter than the category list) is drawn in line, area and combo-line series.

Created with MrDocs