Skip to content

Commit 2742ae5

Browse files
authored
Merge pull request #72 from RetiredWizard/sparkline
multisparkline: call update_line with single line index rather than …
2 parents f90a7cb + f07b60e commit 2742ae5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adafruit_display_shapes/multisparkline.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,8 @@ def add_values(self, values: List[float], update: bool = True) -> None:
172172
call the update()-method
173173
"""
174174

175-
lines_to_update = []
176175
for i, value in enumerate(values):
177176
if value is not None:
178-
lines_to_update.append(i)
179177
top = self.y_tops[i]
180178
bottom = self.y_bottoms[i]
181179
if (
@@ -197,8 +195,8 @@ def add_values(self, values: List[float], update: bool = True) -> None:
197195
self.y_tops[i] = top
198196
self.y_bottoms[i] = bottom
199197

200-
if update and lines_to_update:
201-
self.update_line(lines_to_update)
198+
if update:
199+
self.update_line(i)
202200

203201
def _add_point(
204202
self,

0 commit comments

Comments
 (0)