Caplin Trader 4.7.1

Class: module:caplin/chart/series/SeriesManager

module:caplin/chart/series/SeriesManager

Constructor

new module:caplin/chart/series/SeriesManager()

Constructs a new caplin.chart.series.SeriesManager. A class to help you manage module:caplin/chart/Series objects.

Methods

add(seriesId, series)

Adds a module:caplin/chart/Series to the manager.
Parameters:
Name Type Description
seriesId String The ID of the series.
series module:caplin/chart/Series The series object to store.
Throws:
If series is not an instance of module:caplin/chart/Series.
Type
module:caplin/core/Error

dispose(seriesIdToRetainopt)

Disposes of all module:caplin/chart/Series objects stored in this manager. It will call module:caplin/chart/Series#dispose on each object before removing it.
Parameters:
Name Type Attributes Description
seriesIdToRetain String <optional>
If set the series object with this ID will not be removed.

getAll() → {Array}

Returns all module:caplin/chart/Series objects in this manager.
Returns:
Type
Array

getById(seriesId) → {module:caplin/chart/Series|null}

Returns a module:caplin/chart/Series object if found in the manager, null otherwise.
Parameters:
Name Type Description
seriesId String ID of the series.
Returns:
Type
module:caplin/chart/Series | null

getCount() → {Number}

Returns the number of module:caplin/chart/Series objects in this manager.
Returns:
Type
Number

remove(seriesId, dispose)

Removes the module:caplin/chart/Series object from the manager. By default it will first call module:caplin/chart/Series#dispose on the series object.
Parameters:
Name Type Description
seriesId String ID of the series to remove
dispose Boolean Call dispose on the series object before removing it (defaults to true).

serialize() → {String}

Returns a XML representation of all the series stored in this manager. This method will call module:caplin/chart/Series#serialize on each stored series object.
Returns:
Type
String