Panel interconnectivity between two Plotly plots

Greetings,
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?

Thanks,

Maybe relevant?
http://holoviews.org/user_guide/Linking_Plots.html
http://holoviews.org/reference/streams/bokeh/Selection1D_tap.html?highlight=tap

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.
Thanks

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

plotly_pn = pn.pane.Plotly(...)
plotly_pn.param.watch(func, "click_data")

Something like this I guess

Thank you! I appreciate your help.

1 Like