file-styles-new-graph #1

Merged
s434749 merged 5 commits from file-styles-new-graph into master 2021-06-22 07:42:20 +02:00
Showing only changes of commit 48c35debc8 - Show all commits

View File

@ -150,14 +150,15 @@ app.layout = html.Div(
]
)
# Callback for downloading file
@app.callback(
Output("download-data", "data"),
Input("btn_data", "n_clicks"),
[Input("btn_data", "n_clicks"), Input('table_selector', 'value')],
prevent_initial_call=True,
)
def create_download_file(n_clicks):
def create_download_file(n_clicks, selected_table):
global selected_stock_in_table_df
return dcc.send_data_frame(selected_stock_in_table_df.to_csv, "data.csv")
return dcc.send_data_frame(selected_stock_in_table_df.to_csv, "data-{table}.csv".format(table = selected_table))
# Callback for timeseries price
@app.callback(Output('timeseries', 'figure'), [Input('stockselector', 'value')])