SparkLine Documentation¶
SparkLine class¶
- class pygameyagui.SparkLine(toolbox, label)¶
This class creates a SparkLine widget.
- Parameters:
toolbox (
pygameyagui.Toolbox) – The toolbox that will host the widget.label (str) – The text to be shown in the SparkLine widget.
Inheritance
SparkLine class inherits from Chart class.
SparkLine methods¶
- SparkLine.update_dataset(value)¶
Use this to add a value to the dataset.
- Parameters:
value (int or float) – A value to be added
- Return type:
NoneType
SparkLine properties¶
- SparkLine.value¶
Get the last value of the dataset (int or float) or None if dataset is empty.
Overrides
pygameyagui.Numeric.value.Default value is None. It is a read-only property.
- SparkLine.color¶
Get or set the graph color (str).
Note: Accepted values are red, green, yellow or blue. Default value is red.
SparkLine constants¶
- constants.SPARKLINE_MIN_SIZE_FACTOR = 3¶
- constants.SPARKLINE_MAX_SIZE_FACTOR = 4¶
- constants.SPARKLINE_DEFAULT_SIZE_FACTOR = 4¶