I have a callback that generates a linegraph
@app.callback(
Output('vitals', 'figure'),
[Input('datasets', 'data'), # store component
Input('filter1', 'value')],
prevent_initial_call=True
)
def create_line_graph(datasets_store, selected_sim):
I also have a callback for my DataTable right after:
@app.callback(
[Output('events-table', 'columns'),
Output('events-table', 'data'),
Output('events-table', 'tooltip_data')],
[Input('datasets', 'data'),
Input('filter1', 'value'),
Input('filter2', 'value'),
Input('filter3', 'value')]
)
I would like to have another callback that updates the line graph when I select a row from the DataTable
I started with this callback logic but I believe I cant do this because the output value is the same as the first callback.
How can I solve this: essentially have my graph and table get created at launch and then allow interaction with the Data Table to update the line graph ?
@app.callback(
Output('vitals', 'figure'),
Input('events-table', "derived_virtual_data"),
Input('events-table', 'derived_virtual_selected_rows'),
Input('datasets', 'data'), # store component
Input('filter1', 'value')
)
def update_line_graph(all_rows, selected_rows, datasets_store, selected_sim):
filter_value = all_rows[selected_rows[0]]['Col']