Series
manages data fetching from a backend system using the service aliased by
caplin.chart-service
. Its primary purpose is to provide a study management mechanism.
Chart components construct a new caplin.chart.Series
object (passing it a
caplin.chart.series.SeriesRequest which describes the type of data to request) when they wish to request
new chart series data to display.
Classes that wish to be notified of a series's events must implement the caplin.chart.series.SeriesListener interface and register themselves as a listener to that series.
Classes that wish to be notified of a series's study events must implement the caplin.chart.series.StudyListener interface and register themselves as a listener to that series.
Attributes | Name and Description |
---|---|
|
caplin.chart.Series(Object seriesRequest, Object chartSeriesAdapter)
Constructs a new |
Attributes | Name and Description |
---|---|
|
void
addListener(caplin.chart.series.SeriesListener listener)
Adds a listener for series events. |
|
caplin.chart.Study
addStudy(String studyAlias, Object derivationParams, Object configOverrides, caplin.chart.study.Adapter studyAdapter)
Adds a study to this series. |
|
void
addStudyListener(caplin.chart.series.StudyListener listener)
Adds a listener for study events. |
|
void
dispose()
This method disposes the |
|
caplin.chart.series.SeriesRequest
getSeriesRequest()
Returns a caplin.chart.series.SeriesRequest object that was passed to the constructor. |
|
caplin.chart.Study
getStudy(String studyId)
Gets the study object. |
|
void
removeStudy(String studyId)
Removes a study from the series. |
|
void
serialize()
private |
►
caplin.chart.Series(Object seriesRequest, Object chartSeriesAdapter)
Constructs a new caplin.chart.Series
.
Object | seriesRequest | A caplin.chart.series.SeriesRequest object that determines what data you are requesting from the backend. |
Object | chartSeriesAdapter | A caplin.chart.series.Adapter object that transforms the series data into an understandable format for the chart engine in use. |
►
void
addListener(caplin.chart.series.SeriesListener listener)
Adds a listener for series events.
caplin.chart.series.SeriesListener | listener | The listener that will receive series data. |
►
caplin.chart.Study
addStudy(String studyAlias, Object derivationParams, Object configOverrides, caplin.chart.study.Adapter studyAdapter)
Adds a study to this series.
String | studyAlias | The study alias, to be retrieved from the AliasRegistry. |
Object | derivationParams | An object literal containing the options for the study. |
Object | configOverrides | (optional) Configuration passed from the descendant class upon instantiation. |
caplin.chart.study.Adapter | studyAdapter | (optional) The adaptor to pass the study data through before passing it onto the caplin.chart.Chart. |
►
void
addStudyListener(caplin.chart.series.StudyListener listener)
Adds a listener for study events.
caplin.chart.series.StudyListener | listener | The listener that will receive study data. |
►
void
dispose()
This method disposes the caplin.chart.Series
object. It must be called to properly close subscriptions.
►
caplin.chart.series.SeriesRequest
getSeriesRequest()
Returns a caplin.chart.series.SeriesRequest object that was passed to the constructor.
Request
object.
►
caplin.chart.Study
getStudy(String studyId)
Gets the study object.
String | studyId | The study ID you want to retrieve. |
►
void
removeStudy(String studyId)
Removes a study from the series.
String | studyId | The ID of the study to remove. |
►
void
serialize()
private