TODAY learn how to bring Drag & Drop to Dash with Dashboard Engine. 🌠 Sign up for the live event!

How to get multiple clickData notifications of the same object in a choropleth map (or multiple hover notifications)?

It appears that only the first click of, e.g. a state in a map of the US states, triggers the callback registered for clickData inputs. (Similarly, if you move your mouse inside a state you don’t get any hoverData triggers after the first.) Is there any way to get notification of repeated clicks on the same object (e.g, state)?

You only get a callback when a property changes. Hence what you see is intended behavior. Having the same “issue” in Dash Leaflet, i ended up adding an n_clicks property. Since it’s incremented each time a feature is clicked, the callback will execute every time.

Thanks @Emil. Yeah, I figured it was probably intended.

It looks like n_clicks only gets triggered from buttons–? When I set the input source to my dash core components choropleth graph map like this: Input(‘my_racism_map’,‘n_clicks’)
I’m getting an error:
Property “n_clicks” was used with component ID:
in one of the Input items of a callback.
This ID is assigned to a dash_core_components.Graph component
in the layout, which does not support this property.

Were you able to get n_clicks from a map, or a graph?

Sorry if it was not clear from my previous post, but I was referring to Dash Leaflet, an alternative map component to a Plotly Graph. Here is an example,

Ahh ok, that looks very cool! I’ll have to test that for my next project.

I guess I will have to work around this limitation for now.