From 6f3d78b7293517b511fca948ed68ec40fd04b415 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 28 Feb 2022 07:40:02 -0500 Subject: [PATCH] Handle "no data" case in ranger calcs and avoid crashes --- piker/ui/_display.py | 1 + 1 file changed, 1 insertion(+) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index 656554e1..c6d0f5aa 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -93,6 +93,7 @@ def chart_maxmin( if not in_view.size: log.warning('Resetting chart to data') chart.default_view() + return (last_bars_range, 0, 0, 0) mx, mn = np.nanmax(in_view['high']), np.nanmin(in_view['low'])