Helper class for plot downsampling methods.

Hierarchy

  • Downsample

Constructors

Methods

Constructors

Methods

  • Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have the same visual fidelity as the original table, but with fewer rows.

    Parameters

    • table: Table

      The table to downsample.

    • xCol: string

      The name of the X column to downsample. Must be an Instant or long.

    • yCols: string[]

      The names of the Y columns to downsample.

    • width: number

      The width of the visible area in pixels.

    • Optional xRange: LongWrapper[]

      The visible range as [start, end] or null to always use all data.

    Returns Promise<Table>

    A promise that resolves to the downsampled table.