From f07b60ea2182feb4ad5b4e462b302eb53a91b139 Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Tue, 7 May 2024 00:46:14 -0400 Subject: [PATCH] multisparkline: call update_line with single line index rather than list of indexes --- adafruit_display_shapes/multisparkline.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/adafruit_display_shapes/multisparkline.py b/adafruit_display_shapes/multisparkline.py index acc1bee..0d01b8b 100644 --- a/adafruit_display_shapes/multisparkline.py +++ b/adafruit_display_shapes/multisparkline.py @@ -172,10 +172,8 @@ def add_values(self, values: List[float], update: bool = True) -> None: call the update()-method """ - lines_to_update = [] for i, value in enumerate(values): if value is not None: - lines_to_update.append(i) top = self.y_tops[i] bottom = self.y_bottoms[i] if ( @@ -197,8 +195,8 @@ def add_values(self, values: List[float], update: bool = True) -> None: self.y_tops[i] = top self.y_bottoms[i] = bottom - if update and lines_to_update: - self.update_line(lines_to_update) + if update: + self.update_line(i) def _add_point( self,