Avena Webapp API - v0.0.1
    Preparing search index...

    Function downsampleMinMax

    • Reduces a sorted series to at most two points per bucket (the bucket's minimum and maximum, in time order), keeping every gap.

      Runs of present values are reduced separately; a NaN point is kept between runs, so a gap survives downsampling. Series that already fit are returned unchanged.

      Parameters

      • data: DataPoint[]

        Points sorted by time.

      • bucketCount: number

        Number of buckets, usually the plot width in pixels.

      Returns DataPoint[]

      The reduced series, or data itself.