Scale PV curve graph to production max only
This commit is contained in:
@@ -715,12 +715,10 @@ class Matrix64Display(SampleBase):
|
|||||||
graphics.DrawText(canvas, small_font, 10, 38, label_color, "Sin datos")
|
graphics.DrawText(canvas, small_font, 10, 38, label_color, "Sin datos")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Find max across both datasets for shared scale
|
# Scale to PV production max (main focus of this view)
|
||||||
max_val = 1
|
max_val = 1
|
||||||
if self.pv_history:
|
if self.pv_history:
|
||||||
max_val = max(max_val, max(p for _, p in self.pv_history))
|
max_val = max(max_val, max(p for _, p in self.pv_history))
|
||||||
if self.consumption_history:
|
|
||||||
max_val = max(max_val, max(p for _, p in self.consumption_history))
|
|
||||||
|
|
||||||
# Labels above graph area (with margin)
|
# Labels above graph area (with margin)
|
||||||
if max_val >= 1000:
|
if max_val >= 1000:
|
||||||
|
|||||||
Reference in New Issue
Block a user