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

Class DateTimeSeries

source code

object --+    
         |    
    Series --+
             |
            DateTimeSeries

This class defines a datetime series. In this series, the X value must be date and Y values must be number. To use number values, use XYSeries

By default, the time of a day is not included in the X value. In order to include time, use a constructor with argument isIncludeTime and pass true value for the argument.


Authors:
Invient, Richard Lincoln

See Also: XYSeries

Instance Methods [hide private]
 
__init__(self, invientCharts, *args)
Creates a series with given name.
source code
 
removePoint(self, *points)
Removes all points specified as method argument into this series
source code
 
removeAllPoints(self)
Removes all points in this series
source code
 
addPoint(self, point_or_points, shift=None)
Appends the specified point(s) into the series if they do not exists in this series.
source code
 
isIncludeTime(self)
Returns: Returns true if the time in the X property of DateTimePoint will be considered when drawing the chart otherwise false.
source code
 
getPoints(self)
Returns: Returns all points of this series.
source code
 
setSeriesPoints(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
 
__str__(self)
str(x)
source code

Inherited from Series: __eq__, __hash__, addPointsInternal, getConfig, getName, getStack, getType, getXAxis, getYAxis, hide, setInvientCharts, setName, setPoints, setStack, setType, setXAxis, setYAxis, show

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

Class Methods [hide private]
 
getDefPointStart(cls) source code
 
getUpdatedDate(cls, dt, milliseconds) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, invientCharts, *args)
(Constructor)

source code 

Creates a series with given name. This series will not consider time in the X property of DateTimePoint.

Parameters:
  • args - tuple of the form:
    • (name)
      • the name of this series
    • (name, isIncludeTime)
      • the name of this series
      • If true then the time in the X property of DateTimePoint will be considered when drawing the chart. Defaults to false.
    • (name, config)
      • the name of this series
      • the configuration for this series
    • (name, config, isIncludeTime)
      • the name of this series
      • the configuration for this series
      • If true then the time in the X property of DateTimePoint will be considered when drawing the chart. Defaults to false.
    • (name, seriesType, isIncludeTime)
      • the name of this series
      • the type of this series
      • If true then the time in the X property of DateTimePoint will be considered when drawing the chart. Defaults to false.
    • (name, seriesType, config)
      • the name of this series
      • the type of this series
      • the configuration for this series
    • (name, seriesType, config, isIncludeTime)
      • the name of this series
      • the type of this series
      • the configuration for this series
      • If true then the time in the X property of DateTimePoint will be considered when drawing the chart. Defaults to false.
Overrides: object.__init__

removePoint(self, *points)

source code 

Removes all points specified as method argument into this series

Overrides: Series.removePoint

removeAllPoints(self)

source code 

Removes all points in this series

Overrides: Series.removeAllPoints
(inherited documentation)

addPoint(self, point_or_points, shift=None)

source code 
Appends the specified point(s) into the series if they do not exists in
this series. The points which already exists will not be appended. A
collection of points appended to this series will be returned.

@param point_or_points:
@param shift:
           If true then one point is shifted off the start of this
           series as one is appended to the end.
@return 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 input argument points then it will not be added in
        this series.

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.
Overrides: Series.addPoint

isIncludeTime(self)

source code 
Returns:
Returns true if the time in the X property of DateTimePoint will be considered when drawing the chart otherwise false.

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.
Overrides: Series.getPoints
(inherited documentation)

setSeriesPoints(self, points)

source code 

Sets points into this series. This method removes all of its points and then add points specified in the method argument. If the argument is null then no actions are taken.

Parameters:
  • points - the collection of points to set into this series.
Returns:
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 input argument points then it will not be added in this series.

updatePointXValuesIfNotPresent(self)

source code 

Each of the subclass needs to implement this method to ensure that each point has appropriate X value even if it is not specified.

Overrides: Series.updatePointXValuesIfNotPresent
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)