Caplin Trader 4.7.1

Interface: module:caplin/chart/service/ChartServiceListener

module:caplin/chart/service/ChartServiceListener

The chart service listener interface.

Methods

onSeriesData(data, reset, finalisedData)

Called by the ChartService when it has data to pass to it's listeners.
Parameters:
Name Type Description
data Array Chart series data in the Caplin chart format.
reset Boolean Indicates whether the listener should discard the previous data.
finalisedData Boolean Indicates whether the data is final (true) or (false) if it could still change (intraperiod updates).

onSeriesDataPending()

Called by the ChartService as an acknowledgment that chart data has been received.

The data is being processed by the ChartService and once complete, onSeriesData will be called.

onSeriesDataSubscriptionError(error)

Called by the ChartService when a error for the data subscription occurs.
Parameters:
Name Type Description
error String The error that occurred.

onSeriesDataSubscriptionStatus(status)

Called by the ChartService when a status for the data subscription changes.
Parameters:
Name Type Description
status String New status.