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

Class Point

source code

object --+
         |
        Point

This class represents a point of the chart's series. A series can have one or more points. A point has (X, Y) coordinates. None of the coordinates are mandatory. The name of a point can be displayed in a tooltip.

To represent no activity or missing points in the chart, create a point with both X and Y as null or just Y as null.

It is possible to specify custom configuration for each point. e.g. If a highest point can be marked in a chart with a different color using this configuration.

A point cannot be created without a series. It must belong to a series. However, the point must be added to a series by calling Series.addPoint() or Series.setPoints() to permanently add point to the series.


Authors:
Invient, Richard Lincoln
See Also:
DecimalPoint, DateTimePoint, PointConfig
Instance Methods [hide private]
 
__init__(self, series, name_or_config=None, config=None)
Creates a point with given arguments.
source code
 
getId(self) source code
 
getName(self)
Returns: Returns name of this point
source code
 
setName(self, name)
Sets name of this point
source code
 
getSeries(self)
Returns: Returns Series associated with this point
source code
 
getConfig(self)
Returns: Returns PointConfig for this point
source code
 
setConfig(self, config)
Sets PointConfig for this point
source code
 
isAutosetX(self)
Returns: Returns true if X value of this point is set programmatically
source code
 
setAutosetX(self, isAutosetX)
If the argument is true it indicates that the X value of this point is set programmatically and user has not specified it.
source code
 
isShift(self)
Returns: Returns true if a point at the start of the series should beshifted off when this point is appended otherwise false.
source code
 
setShift(self, shift)
A value of true means one point is shifted off the start of the series as one is appended to the end.
source code
 
getX(self)
Returns: Returns X value of this point
source code
 
getY(self)
Returns: Returns Y value of this point
source code
 
__str__(self)
str(x)
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, series, name_or_config=None, config=None)
(Constructor)

source code 

Creates a point with given arguments.

Parameters:
  • series - The series to which the point must be associated.
  • name_or_config - The configuration for this point, or the name of this point
  • config - The configuration for this point, if any
Raises:
  • ValueError - If the argument series is null
Overrides: object.__init__

getName(self)

source code 
Returns:
Returns name of this point

setName(self, name)

source code 

Sets name of this point

Parameters:
  • name - name of this point

getSeries(self)

source code 
Returns:
Returns Series associated with this point

getConfig(self)

source code 
Returns:
Returns PointConfig for this point

setConfig(self, config)

source code 

Sets PointConfig for this point

Parameters:
  • config - configuration of this point

See Also: PointConfig

isAutosetX(self)

source code 
Returns:
Returns true if X value of this point is set programmatically

isShift(self)

source code 
Returns:
Returns true if a point at the start of the series should beshifted off when this point is appended otherwise false.

getX(self)

source code 
Returns:
Returns X value of this point

getY(self)

source code 
Returns:
Returns Y value of this point

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)