plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Hover data not showing correctly for px.scatter inside go.FigureWidget

Open 0Shark opened this issue 1 year ago • 0 comments

Environment requirements

Python 3.11 on Linux, in Jupyter Notebook inside VSCode.

Extensions: ms-toolsai.jupyter v2024.1.1

Packages: plotly: 5.24.1 ipywidgets: 8.1.5 jupyterlab 3.6.8

Issue description

Hello, I'm having this issue where the hover data doesn't seem to show correctly, but it instead shows "%{customdata[0}" on the hover box.

fig_scatter = go.FigureWidget(px.scatter(df, x='some_column1', y='some_column2', title=f'Scatterplot', hover_data=['column_in_df'] ))

If I have the px.scatter plotted using a go.Figure directly it works but with go.FigureWidget it doesn't.

x and y columns show on the hover data, while this extra column_in_df doesn't even though it's also part of the df.

Let me know if any additional information is needed. Any help is appreciated, thank you!

image

0Shark avatar Oct 15 '24 12:10 0Shark