Plotly click_data not working after 1.0 upgrade

Hi Team. The 1.0 update is nice but it broke Plotly’s click_data functionality which I was using to trigger UI events when an area on plot was clicked.

fig = go.Figure(data=data)
    margin=dict(r=5, l=5, b=5, t=5),
fig.update_yaxes(scaleanchor="x", scaleratio=1)
fig.layout.autosize = True

plot = pn.pane.Plotly(fig)

@pn.depends(plot.param.click_data, watch=True)
        def click_handler(event, data=data):

In 0.14.4, the event would consistently output the correct correct scatterplot point but in 1.0 it either outputs the wrong point or simply outputs {'points': [{'curveNumber': 7}]} and nothing else.

Can someone please help? We are hoping to use panel extensively in our company and I would really like to upgrade to 1.0 but this is a huge blocker.


Seems like a regression.

Can you open an issue Issues · holoviz/panel · GitHub about it with a minimal, reproducible example (MRE)?

In general, a complete script only with the essential code, which can be copied/pasted and immediately run as-is with no modifications. This is much more useful than snippets.

1 Like