@pond-ts/charts API Reference
    Preparing search index...

    Function ohlcFromTimeSeries

    • Build an OhlcSeries from a pond TimeSeries — four numeric price columns (open/high/low/close) plus the candle's horizontal slot.

      Key-shape aware, like barsFromTimeSeries. An interval / timeRange-keyed series (an aggregate rollup — weekly / monthly bars) uses the key's own [begin, end) as the slot. A point-keyed (time) series — raw daily OHLCV — has begin === end (zero width), so the slot is derived from neighbour spacing (each candle centred on its timestamp, reaching halfway to each neighbour; see neighbourSpans). This is the ergonomic win over the interval-only boxFromTimeSeries: raw OHLC feeds straight in with no aggregate pass.

      A key with any of the four prices missing reads as a gap (the candle draws nothing). Detected by keyColumn().kind === 'time'.

      Type Parameters

      • S extends SeriesSchema

      Parameters

      Returns OhlcSeries

      RangeError if any price column does not exist.

      TypeError if any price column is not a numeric column.