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

    Function barsFromTimeSeries

    • Build a BarSeries from a pond TimeSeries — one bar per event, the key's [begin, end] as the x-span and column as the height.

      Key-shape fallback (point-keyed series). The primary form is interval / timeRange-keyed, where each key already carries a [begin, end] span. A point-keyed (time) series has begin === end (zero width), so this derives a span from neighbour spacing: each bar is centred on its timestamp and reaches halfway to each neighbour (a Voronoi cell on the time axis). The first/last bars mirror their single adjacent gap so the row's end bars match their interior width. A lone point (length 1) has no neighbour, so it keeps zero width and falls back to the renderer's minWidth.

      This makes a uniformly-sampled point series render as contiguous bars (the histogram look) without the caller pre-keying to intervals, while an interval-keyed series (e.g. an aggregate/window rollup) draws its true bucket spans. Detected by keyColumn().kind === 'time'.

      Type Parameters

      • S extends SeriesSchema

      Parameters

      • series: TimeSeries<S>
      • column: string

      Returns BarSeries

      RangeError if column does not exist.

      TypeError if column is not a numeric column.