I’ve got a choropleth map of the U.S. in a plotly express dash app using python and I can’t figure out how to hide the hoverlabel while retaining access to hover activity and clicks via the hoverData and clickData triggers in my callback.
More Details:
I’m setting it up so when a user clicks on a state it will ideally put an outline around that state and “freeze” its hoverlabel so they can move their cursor across other states (without seeing other states’ hoverlabels) and then onto another chart, a simple bar chart, where they can explore further details about that state. The first step is to stop other (or even all) hoverlabels from showing after a click but still receive hoverData and clickData so that when they click again somewhere on the map it will “unfreeze”.
@nicolaskruchten 's suggestion here,
to set hovertemplate=None
alongside hoverinfo='skip'
in your .update_traces()
works but disables input as well. And setting staticPlot:True
in config also works but also disables both hoverData and clickData.
Another suggestion by @etienne,
to set hoverinfo:none I can’t seem to get working.
1 post - 1 participant