Hello,
I’m a complete newbie using Dash (great work BTW) and I’m hiting a wall.
I have two graphs showing the evolution of Temperatures on one and Humidity on the other, over the same timescale.
When I select a point on one of this graph I want to update a text and some other graphs.
Everything works fine except that when I have selected data on one of the graph (for instance the one with the temperatures) I can’t update by clicking on the other graph.
For instance here is my code to update the text:
@app.callback(
dash.dependencies.Output(‘click-data’, ‘children’),
[dash.dependencies.Input(‘temp-time-series’, ‘clickData’),
dash.dependencies.Input(‘hum-time-series’, ‘clickData’)])
def display_click_data(clickDataTemp,clickDataHum):
if clickDataTemp :
return clickDataTemp[‘points’][0][‘x’]
elif clickDataHum:
return clickDataHum[‘points’][0][‘x’]
I think I understand the problem as once I have selected a point on a graph it stays selected even if I select another point on the other graph. However I have no idea how to fix it.
Thanks a lot for your help!