Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How to create connected/linked interactivity charts/graph (linked views)

I try to use plotly (python) to create a 2 connected-charts like this (u can scroll to page 8) https://www.biostat.wisc.edu/~kbroman/talks/InteractiveGraphs2/

i.e. Chart 1 is multiple line chart for multiple data points. Whenever I click on a data point in chart 1, a view (additional infos - like probability distribution) will be updated on chart 2

Is it possible in plotly, or do I need to use Javascript for this ? Or could you suggest a better library/tools than plotly for this task ?

Strictly speaking Python:
Unless you use a jupyter notebook and connect up the widgets shown here, not really. The other way to do this (kind of hacky) is to make your second figure a subplot. However, there are easier ways–albeit with a little bit of a learning curve. Staying within Python, you can use Dash by Plotly. Dash allows you to create interactive and interconnected plots using Plotly, all while staying in the Python world. This does have the caveat that customized CSS is kind of a pain, but that will change.

Lastly, you have the Plotly.js method. This allows you to capture events (like hover and click) as well as layout changes like zoom or pan. This does mean, though, that you will have to dip your toes into the JS world.