new module:ct-chart /series /Series Manager()
Constructs a new SeriesManager
.
A class to help you manage module:ct-chart/Series
objects.
Methods
add(series Id, series)
Adds a module:ct-chart/Series
to the manager.
Parameters:
Name | Type | Description |
---|---|---|
seriesId |
String | The ID of the series. |
series |
module:ct-chart |
The series object to store. |
Throws:
-
If
series
is not an instance ofmodule:ct-chart/Series
. - Type
-
module:ct-core
/Error
dispose(series IdToRetainopt)
Disposes of all module:ct-chart/Series
objects stored in this manager. It will call
module:ct-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. |
get All() → {Array}
Returns all module:ct-chart/Series
objects in this manager.
Returns:
- Type
- Array
get ById(series Id) → {module:ct-chart /Series|null}
Returns a module:ct-chart/Series
object if found in the manager, null otherwise.
Parameters:
Name | Type | Description |
---|---|---|
seriesId |
String | ID of the series. |
Returns:
- Type
-
module:ct-chart
/Series | null
get Count() → {Number}
Returns the number of module:ct-chart/Series
objects in this manager.
Returns:
- Type
- Number
remove(series Id, disposeopt)
Removes the module:ct-chart/Series
object from the manager. By default it will first call
module:ct-chart/Series#dispose
on the series object.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
seriesId |
String | ID of the series to remove |
||
dispose |
Boolean |
<optional> |
true | Call |
serialize() → {String}
Returns a XML representation of all the series stored in this manager. This method will call
module:ct-chart/Series#serialize
on each stored series object.
Returns:
- Type
- String