Helper class to manage snapshots and deltas. Keeps a contiguous JS array of data per column in the underlying table, and supports a mapping function to let client code translate data in some way for display and caches the translated values.

Hierarchy

  • ChartData

Constructors

Methods

Constructors

Methods

  • Returns the cached data for columnName.

    The cache key includes both `columnName` and `mappingFunc`. If no cached entry exists, the column data is computed from `currentUpdate` and stored for future calls.

    If you want subsequent calls to re-use cached data, use the same `mappingFunc` instance each time.

    Parameters

    • columnName: string

      the column name

    • mappingFunc: ((arg0) => any)

      an optional mapping function applied to each value; null returns the raw column values

        • (arg0): any
        • Parameters

          • arg0: any

          Returns any

    • currentUpdate: TableData

      the table snapshot used to populate the cache when the column is requested for the first time

    Returns any[]

    a contiguous JS array of values for this column

  • Removes a column from the cache, avoiding extra computation on incoming events, and possibly freeing some memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.

    Parameters

    • columnName: string
    • mappingFunc: ((arg0) => any)
        • (arg0): any
        • Parameters

          • arg0: any

          Returns any

    Returns void

  • Updates cached column data to reflect a subscription update.

    This applies row removals, insertions, and modifications to any cached column arrays so they remain aligned with the table's current row order.

    Parameters

    Returns void