Pebble App Framework: Phone API
    Preparing search index...

    Function seriesIndex

    • Works out which point of a series holds a moment.

      The point is floor((atSeconds - start) / stepSec). A forecast series starts at the place's own midnight, so the first point is rarely now, and reading values[0] would show hours already gone. The end is the longest values list the series carries, since its shapes share one axis. A start outside the moments a plugin can send leaves the series with no axis.

      Parameters

      • series: SeriesShape | undefined

        The series off a property, which may be missing.

      • atSeconds: number

        The moment, as epoch seconds.

      Returns number | undefined

      The point's index, or undefined before the start, past the end, or with no usable axis.