@geepy wrote:
I have a python dash app that displays a graph containing two subplots and a slider.
The code is something like this:figure = make_subplots(rows=2,cols=1, shared_xaxes=True) figure_update_layout(xaxis=go.layout.XAxis(rangeslider=dict(autorange=True)) ... html.Div([ dcc.Graph(id='my-graph', figure=figure), html.Div([dcc.Table([some_sophisticated_data])], id='my-table') ])
Now I’d like to update the table contents whenever the user moves the slider controls.
Function would be like this:
@app.callback(Output('my-table', 'children'), Input('my-graph', '???') def renderTable(new_range): return dcc.Table([some_sophisticated_data])]
where some_sophisticated_data depends on the range.
What do I have to use in place of the question marks? I tried ‘xaxis.range’, but that does not fire…
Or do I have to put the slider outside the graph? This would be painful as I’d have to update the graph from the server side which would slow down the web performance (>4000 data points…)
Posts: 2
Participants: 2