From 0e7d274f2ef4a267517900836a34b2464aee5f7f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 22 Apr 2022 19:01:37 -0400 Subject: [PATCH] Put mxmn profile mapping at end of method --- piker/ui/_chart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index 8aa10091..cecbbff5 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1283,7 +1283,7 @@ class ChartPlotWidget(pg.PlotWidget): flow is None ): log.error(f"flow {flow_key} doesn't exist in chart {self.name} !?") - res = 0, 0 + key = res = 0, 0 else: first, l, lbar, rbar, r, last = bars_range or flow.datums_range() @@ -1291,11 +1291,11 @@ class ChartPlotWidget(pg.PlotWidget): key = round(lbar), round(rbar) res = flow.maxmin(*key) - profiler(f'yrange mxmn: {key} -> {res}') if res == (None, None): log.error( f"{flow_key} no mxmn for bars_range => {key} !?" ) res = 0, 0 + profiler(f'yrange mxmn: {key} -> {res}') return res