diff --git a/daqviewer/sharing_wp.py b/daqviewer/sharing_wp.py index 21de20a..1f2f819 100644 --- a/daqviewer/sharing_wp.py +++ b/daqviewer/sharing_wp.py @@ -12,12 +12,12 @@ from dash.dependencies import Input, Output, State app = dash.Dash(__name__) app.layout = html.Div([ - html.Div(dcc.Graph(id='graph')), + html.Div(dcc.Graph(id='timeseries')), html.Div(id='div-table'), html.Div(id='datatable-row-ids-container'), + html.Div(id='storage', style={'display': 'none'}), html.Div([ html.Button('Load', id='button'), - html.Div(id='storage', style={'display': 'none'}) ]) ]) @@ -55,12 +55,11 @@ def load_data(n_clicks): # Round floats df = df.round(2) - return df.to_json(orient='table') @app.callback( - Output('graph', 'figure'), + Output('timeseries', 'figure'), [Input('storage', 'children')], ) def update_graph(json_data):