We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f1d614 commit 6247bf7Copy full SHA for 6247bf7
app/components/battery_history_card.py
@@ -87,7 +87,7 @@ def updateBatteryHistory(self, battery_history_dic):
87
stride = 15
88
previous_timestamp = 0
89
i = 0
90
- linewidth = min(5, self.width() / (len(x_list)) * 3)
+ linewidth = min(5, self.width() / (len(x_list)) * 3 if len(x_list) != 0 else 1)
91
for x, y, charging in zip(x_list, battery_history_dic["battery"], battery_history_dic["charging"]):
92
# vertical lines with color indicating charging status
93
# if consecutive records less than `stride`, then ignore
0 commit comments