I’m trying to develop a dashboard that has a map that updates per year. However, I have two ways to update the year in the map: a dcc.Slider input and a time series graph having year as the hovering data.
The problem arises because whenever I hover the graph, the slider input gets non-functional because the years were already updated by the hovering in the time series. Is there a way to ‘erase hoverData’ when the mouse is placed off the graph?
The code chunk that I tried (but unsuccessfully) follows:
def update_map(year_hovered, year_selected_slider):
if year_hovered is None: year = year_selected_slider else: year = year_hovered['points']['x']