Type alias DataSetDerivedPropertyConfig

DataSetDerivedPropertyConfig: ((info: {
    dataSet: DataSet;
    firstNewSampleIndex: number;
    newCount: number;
    newValues: Record<string, TypedArrayInclBigInt | number[] | number>;
}) => TypedArray | number[])

Type declaration

    • (info: {
          dataSet: DataSet;
          firstNewSampleIndex: number;
          newCount: number;
          newValues: Record<string, TypedArrayInclBigInt | number[] | number>;
      }): TypedArray | number[]
    • Configuration for derived dataset property. i.e. automatically calculated based on other data values.

      This is a callback function that is called from library side on demand (i.e. after non-derived samples are pushed in)

      Note that data edit APIs do not currently update derived properties!

      Parameters

      • info: {
            dataSet: DataSet;
            firstNewSampleIndex: number;
            newCount: number;
            newValues: Record<string, TypedArrayInclBigInt | number[] | number>;
        }
        • dataSet: DataSet

          Reference to the original dataset object

          Important: at the time when derivation callback is called, the dataset does NOT yet include the other new samples. All referencing of the new data points needs to be done via the properties of this callback interface.

        • firstNewSampleIndex: number

          Unique sample index for the first new sample that will be pushed to the dataset.

        • newCount: number

          Amount of new samples that should be filled in for the derived property

        • newValues: Record<string, TypedArrayInclBigInt | number[] | number>

          Non-derived properties values that are incoming to the dataset.

          number data type means that same value will be used for all slots (according to newCount)

      Returns TypedArray | number[]