Highcharts Dashboards
    Preparing search index...

    Modifies a table with the help of modifiers in an ordered chain.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chain: DataModifier[]

    Ordered chain of modifiers.

    Options of the modifier chain.

    defaultOptions: ChainModifierOptions = ...

    Default option for the ordered modifier chain.

    types: DataModifierTypes = ...

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

    Methods

    • Adds a configured modifier to the end of the modifier chain. Please note, that the modifier can be added multiple times.

      Parameters

      • modifier: DataModifier

        Configured modifier to add.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns void

    • 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

    • Clears all modifiers from the chain.

      Parameters

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns void

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

      Type Parameters

      Parameters

      • e: E

        Event object containing additonal event information.

      Returns void

    • Sequentially applies all modifiers in the chain to the given table, updating its modified property with the final result.

      Note: The modified property reference of the table gets replaced.

      Parameters

      • table: DataTable

        Table to modify.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns Promise<DataTable>

      Table with modified property as a reference.

    • Applies several modifications to the table.

      Note: The modified property reference of the table gets replaced.

      Parameters

      • table: DataTable

        Table to modify.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns DataTable

      Table as a reference.

      ChainDataModifier#execute

      ChainDataModifier#afterExecute

    • Registers a callback for a specific modifier event.

      Type Parameters

      • T extends
            | "afterBenchmark"
            | "afterBenchmarkIteration"
            | "error"
            | "modify"
            | "afterModify"
            | "clearChain"
            | "afterClearChain"
            | "addModifier"
            | "afterAddModifier"
            | "removeModifier"
            | "afterRemoveModifier"

      Parameters

      • type: T

        Event type as a string.

      • callback: DataEventCallback<
            ChainModifier,
            | 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.

    • Removes a configured modifier from all positions in the modifier chain.

      Parameters

      • modifier: DataModifier

        Configured modifier to remove.

      • OptionaleventDetail: DataEventDetail

        Custom information for pending events.

      Returns void