Rearrange divs

master
Dan Howe 5 years ago
parent f282ecc8ad
commit fb2e185b53

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

Loading…
Cancel
Save