From db1e0a04f8cfe9f13594d92e87227f24ad18e19d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 9 Feb 2023 09:21:04 -0500 Subject: [PATCH] Only use last `ChartView._yrange` if set --- piker/ui/_display.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index a1958159..a91246e6 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -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