Only use last `ChartView._yrange` if set

storage_cli
Tyler Goodlet 2023-02-09 09:21:04 -05:00
parent 2b075c7644
commit d742dd25c9
1 changed files with 6 additions and 1 deletions

View File

@ -554,7 +554,12 @@ def graphics_update_cycle(
main_vb: ChartView = main_viz.plot.vb
this_viz: Viz = chart._vizs[fqsn]
this_vb: ChartView = this_viz.plot.vb
lmn, lmx = this_vb._yrange
this_yr = this_vb._yrange
if this_yr:
lmn, lmx = this_yr
else:
lmn = lmx = 0
mx: float = lmx
mn: float = lmn
mx_vlm_in_view: float | None = None