From c5b840b870e2b47519899a50ca752ba2af6665fb Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Fri, 25 Aug 2017 12:00:43 +0200 Subject: [PATCH] DASH: bug fix for `None` values in history --- python_suite/dashboard/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index 92db225..f7fa056 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -33,7 +33,7 @@ def register_pv_value_in_history(pv_name, ts, value): # repeat the previous value just before our new NaN value # This is important to extend plot lines until the value gets invalid. if len(HISTORY[pv_name]) > 0 and value is None: - HISTORY[pv_name].append( [ts-0.1, HISTORY[pv_name][1]] ) + HISTORY[pv_name].append( [ts-0.1, HISTORY[pv_name][-1][1]] ) HISTORY[pv_name].append( [ts, value] ) def cb_connection_change(**kwargs): -- 2.43.0