Panel interconnectivity between two Plotly plots

I am creating a Panel dashboard that contains different Plotly plots. I am trying to add a interconnectivity between a Plotly treemap and a time series line plot so the time plot changes whenever I click on a different box from the treemap.
I was able to apply that using Dash framework (using clickData) but I am trying to switch to Panel framework.
Is there a way to replicate this functionality please?


Maybe relevant?

Hey @ahuang11,
I am trying to apply that on Plotly figures using Panel dashboard

According to Plotly — Panel 0.12.6 documentation

click_data (dict): Click callback data
Have you tried using that?

which returns in the example

{"points": [{"curveNumber": 0,"pointNumber": 2,"pointIndex": 2,"x": "Wednesday","y": 9}]}

I was able to print it out as shown in the example here(Plotly — Panel 0.12.6 documentation). But, I couldn’t retrieve that information.
I would be glad if you know how to retrieve it.

def func(event):
    # do something else with the event

plotly_pn = pn.pane.Plotly(...), "click_data")

Something like this I guess

Thank you! I appreciate your help.

1 Like