@ellesse wrote:
I am trying capture mouse hover events using Dash. I capture the position of the mouse using
hoverData.The problem appears when I filter the time series using the range selector or the range slider. The plot correctly reduces to the selected time, but when I hover it with the mouse it resets to the main view (whole main series).
app.layout = html.Div([ dcc.Graph( id='plot' ), ]) @app.callback( Output('plot', 'figure'), [Input('plot', 'hoverData')]) def drawPlot(hoverData): currentDate = hoverData['points'][0]['x'] traces = [go.Scatter(...)] # Draw static time series (does not depend on hoverData) return {'data' : traces, 'layout': go.Layout(xaxis={'rangeselector':{...}, 'rangeslider' : {...}})}
Posts: 1
Participants: 1









