Caplin Trader 5.1.0

Interface: module:ct-chart/service/ChartService

module:ct-chart/service/ChartService

This interface must be implemented by classes that are to provide communication to a backend system for charting data.

The service provided by a class that implements this interface is aliased by caplin.chart-service. The default implementation is module:ct-chart/service/StreamLinkChartService which knows how to obtain chart data from Caplin Platform.

ChartService is used by module:ct-chart/Series.

Methods

discard(seriesRequest, listener)

Unsubscribe from receiving chart series data for the given request.

Parameters:
Name Type Description
seriesRequest Object

The module:ct-chart/series/SeriesRequest object that was used to subscribe.

listener Object

The listener object that will be unsubscribed as a listener.

retrieve(seriesRequest, listener)

Subscribe to receive chart series data.

Parameters:
Name Type Description
seriesRequest Object

A module:ct-chart/series/SeriesRequest object that holds all the information that the message service needs to retrieve the correct chart series data.

listener Object

Object that implements callbacks that the message service will call when it has chart series data.