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

    Function seedManualYLimits

    • Picks the manual Y limits used when autoscale is turned off, from the range the plot showed last, so the plot does not jump.

      The edges are rounded outward to two significant digits beyond the span's order of magnitude (at most six decimals), so the range still covers what was shown and the inputs show short numbers.

      Parameters

      • shown: { high: number; low: number } | null

        Y range of the last drawn frame, or null when nothing was drawn.

      • current: { yMax: number; yMin: number }

        Limits in use; kept when there is no usable range.

      Returns { yMax: number; yMin: number }

      The new yMin and yMax, with yMin < yMax.

      seedManualYLimits({ low: -2, high: 2 }, { yMin: -1, yMax: 1 });              // { yMin: -2, yMax: 2 }
      seedManualYLimits({ low: 0.12345, high: 0.30001 }, { yMin: -1, yMax: 1 }); // { yMin: 0.123, yMax: 0.301 }