Package muntjac :: Package addon :: Package invient :: Module invient_charts :: Class Series
[hide private]
[frames] | no frames]

Class Series

source code

object --+
         |
        Series

This class defines a series of the chart. A series contains a collection of points. Series can be one of types defined by SeriesType.

Each series must have unique name. If an attempt is made to add two series with same then only the first added series will be in effect.

If the series type is not specified, it defaults to chart type and the default chart type is SeriesType.LINE. A series has unique xAxis and yAxis object associated with it. There is no need to set xAxis and yAxis unless the chart has more than one one axis of any type and the series must belong to any of the secondary axis.

It is also possible to specify configuration for individual series and not just series type.


Authors:
Invient, Richard Lincoln
Instance Methods [hide private]
 
__init__(self, name, seriesType_or_config=None, config=None)
Creates a series with given name, type and configuration
source code
 
getConfig(self)
Returns: Returns the configuration object associated with this series
source code
 
getName(self)
Returns: Returns name of this series
source code
 
setName(self, name)
Sets name of this series
source code
 
getType(self)
@return
source code
 
setType(self, typ)
Sets type of this series
source code
 
getStack(self)
Returns: Returns stack of this series
source code
 
setStack(self, stack)
By using this stack property, it is possible to group series in a stacked chart.
source code
 
getXAxis(self)
Returns: Returns x-axis associated with this series.
source code
 
setXAxis(self, xAxis)
Sets x-axis of this series.
source code
 
getYAxis(self)
Returns: Returns y-axis of this series.
source code
 
setYAxis(self, yAxis)
Sets y-axis of this series.
source code
 
removePoint(self, *points) source code
 
removeAllPoints(self)
Removes all points in this series
source code
 
addPoint(self, shift, points)
Adds one or more points into this series, specified as an argument to this method
source code
 
addPointsInternal(self, points) source code
 
getPoints(self)
Returns: Returns all points of this series.
source code
 
setPoints(self, points)
Sets points into this series
source code
 
updatePointXValuesIfNotPresent(self)
Each of the subclass needs to implement this method to ensure that each point has appropriate X value even if it is not specified.
source code
 
show(self)
Show this series
source code
 
hide(self)
Hide this series
source code
 
setInvientCharts(self, invientCharts) source code
 
__hash__(self)
hash(x)
source code
 
__eq__(self, obj) source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, seriesType_or_config=None, config=None)
(Constructor)

source code 

Creates a series with given name, type and configuration

Parameters:
  • name - the name of this series
  • seriesType_or_config - the type of this series or the configuration for this series
  • config - the configuration for this series
Overrides: object.__init__

getConfig(self)

source code 
Returns:
Returns the configuration object associated with this series

getName(self)

source code 
Returns:
Returns name of this series

getStack(self)

source code 
Returns:
Returns stack of this series

setStack(self, stack)

source code 

By using this stack property, it is possible to group series in a stacked chart. Sets stack for this series. If two series belongs to the same stack then the resultant chart will be stacked chart

getXAxis(self)

source code 
Returns:
Returns x-axis associated with this series.

See Also: Axis

setXAxis(self, xAxis)

source code 

Sets x-axis of this series. A series can be associated with at most one x-axis.

getYAxis(self)

source code 
Returns:
Returns y-axis of this series.

setYAxis(self, yAxis)

source code 

Sets y-axis of this series. A series can be associated with at most one y-axis.

addPoint(self, shift, points)

source code 

Adds one or more points into this series, specified as an argument to this method

Returns:
Returns null if the argument is null otherwise returns a collection of points which are added in this series. If a point has same (x, y) value as any other point in the argument points then it will not be added.

getPoints(self)

source code 
Returns:
Returns all points of this series. Adding or removing any point to or from the returned collection will not impact the chart. To add a point or points, use addPoint() or removePoint() method.

setPoints(self, points)

source code 

Sets points into this series

Returns:
Returns null if the argument is null otherwise returns a collection of points which are set in this series. If a point has same (x, y) value as any other point in the argument points then it will not be added.

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)