Using hoverData to update a pie chart

Hi guys,
Am new to Dash. Am trying to update a pie chart based on data from mouse hover over a bar graph.
I have a bargraph showing no. of schools per city Eg.10 schools in Kayo town.
And a pie chart that shows the ratios according to type of school Eg. Kayo town with 10 Schools, 4 are primary schools, 3 high schools and 3 colleges.
Essentially, when you hover over any bar on the bargraph, the pie chart updates using the town name.
How do I achieve this?

There are tutorials here: https://plot.ly/dash/interactive-graphing

1 Like

Thank you.
I was trying to use @app.callback with Jupyter notebooks, that’s where the problem is.
If I use python idle it executes perfectly.
Is there a way to do the same using notebook??