Highcharts Dashboards
    Preparing search index...

    Class DataModifierAbstract

    Abstract class to provide an interface for modifying a table.

    Hierarchy (View Summary)

    Implements

    • DataEventEmitter<DataModifierEvent>
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Modifier options.

    types: DataModifierTypes = ...

    Registry as a record object with modifier names and their class constructor.

    Methods

    • Runs a timed execution of the modifier on the given datatable. Can be configured to run multiple times.

      Parameters

      • dataTable: DataTable

        The datatable to execute

      • Optionaloptions: BenchmarkOptions

        Options. Currently supports iterations for number of iterations.

      Returns number[]

      An array of times in milliseconds

    • Emits an event on the modifier to all registered callbacks of this event.

      Type Parameters

      • E extends DataModifierEvent

      Parameters

      • Optionale: E

        Event object containing additonal event information.

      Returns void

    • Modifies the given table and sets its modified property as a reference to the modified table. If modified property does not exist on the original table, it's always created.

      Parameters

      • table: DataTable

        Table to modify.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns Promise<DataTable>

      Table with modified property as a reference.

    • Creates a modified copy of the given table and sets its modified property as a reference to the modified table. If modified property does not exist, the original table is changed.

      Parameters

      • table: DataTable

        Table to modify.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns DataTable

      Table with modified property as a reference or modified table, if modified property of the original table is undefined.

    • Registers a callback for a specific modifier event.

      Type Parameters

      • T extends
            | "afterBenchmark"
            | "afterBenchmarkIteration"
            | "error"
            | "modify"
            | "afterModify"

      Parameters

      • type: T

        Event type as a string.

      • callback: DataEventCallback<
            DataModifier,
            | Extract<BenchmarkEvent, { type: T }>
            | Extract<ErrorEvent, { type: T }>
            | Extract<ModifyEvent, { type: T }>,
        >

        Function to register for an modifier callback.

      Returns Function

      Function to unregister callback from the modifier event.