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. If a chart component is using
this class it has to implement a caplin.chart.series.SeriesListener
interface that defines the callback methods that this class will
call when it has the chart data to pass on.
Attributes | Name and Description |
---|---|
|
caplin.chart.Series(Object oSeriesRequest, Object oListener, Object oChartSeriesAdapter)
Constructs a new |
Attributes | Name and Description |
---|---|
|
Object
addStudy(String sStudyAlias, Object oOptions, Object oStudyAdapter)
Adds a study to this series. |
|
void
dispose()
This method disposes the |
|
Object
getSeriesRequest()
Returns a caplin.chart.series.SeriesRequest object that was passed to the constructor. |
|
Object
getStudy(String sStudyId)
Gets the study object. |
|
void
removeStudy(String sStudyId)
Removes a study from the series. |
|
void
serialize()
private |
►
caplin.chart.Series(Object oSeriesRequest, Object oListener, Object oChartSeriesAdapter)
Constructs a new caplin.chart.Series
.
Object | oSeriesRequest | A caplin.chart.series.SeriesRequest object that determines what data you are requesting from the backend. |
Object | oListener | A caplin.chart.series.SeriesListener that will receive chart data. |
Object | oChartSeriesAdapter | A caplin.chart.series.Adapter object that will transform the series data into a format that the chart engine in use understands. |
►
Object
addStudy(String sStudyAlias, Object oOptions, Object oStudyAdapter)
Adds a study to this series.
String | sStudyAlias | The study alias, to be retrieved from the AliasRegistry |
Object | oOptions | An object literal containing the options for to the study |
Object | oStudyAdapter | (optional) caplin.chart.study.Adapter to pass the study data through before passing it onto the caplin.chart.Chart |
►
void
dispose()
This method disposes the caplin.chart.Series
object.
It must be called to properly close subscriptions.
►
Object
getSeriesRequest()
Returns a caplin.chart.series.SeriesRequest object that was passed to the constructor.
Request
object.
►
Object
getStudy(String sStudyId)
Gets the study object.
String | sStudyId | The study ID you want to retrieve |
►
void
removeStudy(String sStudyId)
Removes a study from the series.
String | sStudyId | The ID of the study to remove |
►
void
serialize()
private