Hover data not showing correctly for px.scatter inside go.FigureWidget
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
Research direction
Start by reproducing the reported behavior with px.scatter wrapped in go.FigureWidget in a Jupyter Notebook, using the stated Python, Plotly, and ipywidgets versions. Compare it with the same px.scatter passed to go.Figure and inspect how hover_data is represented; done means the hover box shows the column_in_df value instead of the literal %{customdata[0} text.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 13h 41m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.py
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in plotly/plotly.py
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·