We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 90d8dfc + b6c83c3 commit 5d8bffeCopy full SHA for 5d8bffe
adafruit_display_shapes/sparkline.py
@@ -37,6 +37,8 @@
37
38
"""
39
40
+# pylint: disable=too-many-instance-attributes
41
+
42
import displayio
43
from adafruit_display_shapes.line import Line
44
@@ -88,6 +90,13 @@ def __init__(
88
90
max_size=self._max_items - 1, x=x, y=y
89
91
) # self is a group of lines
92
93
+ def clear_values(self):
94
+ """Removes all values from the _spark_list list and removes all lines in the group"""
95
96
+ for _ in range(len(self)): # remove all items from the current group
97
+ self.pop()
98
+ self._spark_list = [] # empty the list
99
100
def add_value(self, value):
101
"""Add a value to the sparkline.
102
:param value: The value to be added to the sparkline
0 commit comments