Highcharts Dashboards
    Preparing search index...

    Class DataPool

    Data pool to load connectors on-demand.

    Data.DataPool

    Pool options with all connectors.

    Implements

    Index

    Constructors

    Properties

    connectors: Record<string, DataConnectorType>

    Internal dictionary with the connectors and their IDs.

    Pool options with all connectors.

    waiting: Record<string, [Function, Function][]>

    Internal dictionary with the promise resolves waiting for connectors to be done loading.

    defaultOptions: DataPoolOptions = ...

    Methods

    • Cancels all data connectors pending requests.

      Returns void

    • Emits an event on this data pool to all registered callbacks of the given event.

      Parameters

      • e: Event

        Event object with event information.

      Returns void

    • Function

      Loads the connector.

      Data.DataPool#getConnector

      Parameters

      • connectorId: string

        ID of the connector.

      Returns Promise<
          | CSVConnector
          | GoogleSheetsConnector
          | HTMLTableConnector
          | JSONConnector,
      >

      Returns the connector.

    • Tests whether the connector has never been requested.

      Parameters

      • connectorId: string

        Name of the connector.

      Returns boolean

      Returns true, if the connector has never been requested, otherwise false.

    • Function

      Registers a callback for a specific event.

      Highcharts.DataPool#on

      Type Parameters

      • T extends "load" | "afterLoad" | "setConnectorOptions" | "afterSetConnectorOptions"

      Parameters

      • type: T

        Event type as a string.

      • callback: DataEventCallback<DataPool, Extract<Event, { type: T }>>

        Function to register for an event callback.

      Returns Function

      Function to unregister callback from the event.