# On-hover callbacks for multiple plots (Scattermapbox + Choropleth)

**URL:** <https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419>\
**Category:** Dash Python\
**Created:** [April 26, 2022, 11:19am UTC](https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419 "2022-04-26T11:19:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![plotlik](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@plotlik](https://community.plotly.com/u/plotlik)\
**Post date:** [April 26, 2022, 11:19am UTC](https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419/1 "2022-04-26T11:19:33Z")

</div>

Hello!

I’d like to create a Dash application containing two plots, one of which is a Choropleth map of a country divided into regions, another one is a Scattermapbox with a set of points inside these regions.  
My goal is to synchronize these two plots, namely there’s a need to highlight the points in the Scattermapbox located inside of the region, which user hovers on the Choropleth map.  
I have the required tools to detect, whether the point is located inside of the region. The problem is that I lack the undetrstanding what Plotly tools I might use to implement this kind of on-hover synchronization.  
I’d be very grateful for your advice, which direction I should move towards. Maybe there are some specific tools you could recommend.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jlfsjunior](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jlfsjunior/32/16061_2.png) [@jlfsjunior](https://community.plotly.com/u/jlfsjunior)\
**Post date:** [April 26, 2022, 11:28am UTC](https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419/2 "2022-04-26T11:28:42Z")

</div>

Hi,

Welcome to the community! 🙂

Please take a look on the following part of the documentation:

> **[Part 4. Interactive Graphing and Crossfiltering | Dash for Python...](https://dash.plotly.com/interactive-graphing)**
>
> Graphs can be inputs as well as outputs: bind interactivity to the Dash \`Graph\` component whenever you hover, click, or select points on your chart.

The example under _“Update Graphs on Hover”_ might be particularly relevant for you.

Please follow-up if you have specific questions on the topic.

Hope this helps! 🙂

---

<div class="post-metadata">

**Author:** ![sanae](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/sanae/32/22339_2.png) [@sanae](https://community.plotly.com/u/sanae)\
**Post date:** [April 28, 2022, 8:40am UTC](https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419/3 "2022-04-28T08:40:45Z")

</div>

check this

> **[Choropleth](https://plotly.com/python/choropleth-maps/)**
>
> Over 10 examples of Choropleth Maps including changing color, size, log axes, and more in Python.

for choropleth map use your csv of data that you need to work with and a geojson file of your map  
and data shows in your map automaticaly , there is lot of attributes in map choropleth to reach your idea

tell us if you have problem with building a choropleth (just have the same ISO code in the geojson and your csv file )

---

<div class="post-metadata">

**Author:** ![plotlik](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@plotlik](https://community.plotly.com/u/plotlik)\
**Post date:** [April 29, 2022, 6:09am UTC](https://community.plotly.com/t/on-hover-callbacks-for-multiple-plots-scattermapbox-choropleth/63419/5 "2022-04-29T06:09:56Z")

</div>

Thank you very much! It solved my problem!
