From 183d2af094288f8af91a178436642fb749de91a8 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Tue, 17 Sep 2019 08:14:24 +1000 Subject: [PATCH] Show empty graphs on startup --- daqviewer/daqviewer.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daqviewer/daqviewer.py b/daqviewer/daqviewer.py index 5e4a529..d59cc1a 100644 --- a/daqviewer/daqviewer.py +++ b/daqviewer/daqviewer.py @@ -126,7 +126,15 @@ def csv_to_json(contents, name): [Input('json-storage', 'children')]) def read_json_data(json_data): if json_data is None: - return html.Div([]) + elements = html.Div([ + dcc.Graph(), + html.Div([ + html.Div([dcc.Graph()], className='six columns'), + ]), + html.Div() + ]) + + return elements info = json.loads(json_data)['info'] df = pd.read_json(json.loads(json_data)['timeseries'], orient='table')