Series class (Graph)

Series(oGraph)

new Series(oGraph)

The Series object holds a collection of Serie type (serie of the control). Use the Series/GetSeries() method to access the control's series collection.
Parameters:
Name Type Description
oGraph Graph Indicates an object of Graph type that owns the collection
Series

Methods

Add(oSerieOptsopt) → {Serie}

The Add() method creates and adds a new serie into the control. Use the Add() method of the Serie object to a new child-serie into the control.
Parameters:
Name Type Attributes Description
oSerieOpts object <optional>
Specifies the options to create the new serie as an object of SerieOptions type
Returns:
Returns the newly created serie, as an object of Serie type
Type
Serie
Example
oGraph.Serie.Add("caption"), adds a new serie with the specified caption.
 oGraph.Serie.Add({value: "caption"}), adds a new serie with the specified caption.
 oGraph.EnsureVisibleClient(oGraph.Serie.Add("caption")), adds a new serie with the specified caption and scrolls the control to ensure that the newly serie fits the control's client area
Add

Clear()

The Clear() method removes all series of the control and inits the control's scroll-bars
Clear

GetCount() → {number}

The GetCount() method returns the number of series within the collection
Returns:
Returns the number of series within the collection
Type
number
Example
The following statements are equivalents:

 oGraph.Serie.GetCount(), counts the series within the control
 oGraph.Serie.Count, counts the series within the control

where oGraph is an object of Graph type
GetCount

Item(id) → {null|Serie}

The Item() method gets the serie giving its index, identifier/key or reference. The Serie(id) method returns the serie based on its index or identifier/key (equivalent of this method)
Parameters:
Name Type Description
id any The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the serie to request
  • id {string}, specifies a string expression that defines the identifier/key of the serie to request
  • id {Serie}, specifies the object reference to the serie to request for
Returns:
Returns null if the serie is not found, or an object of Serie type, if the series collection contains the giving id.
Type
null | Serie
Item

Remove(id)

The Remove() method removes a serie from the collection.
Parameters:
Name Type Description
id any The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the serie to request
  • id {string}, specifies a string expression that defines the identifier/key of the serie to request
  • id {Serie}, specifies the object reference to the serie to request for
Remove

RemoveRange(range)

The RemoveRange() method removes multiple-series at once
Parameters:
Name Type Description
range any Indicates a serie, an array [{Serie}], or an exontrol.Arr([{Serie}])
RemoveRange