"x unified" Does not show all data info at same X
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Environment:
Python 3.9.5
plotly.py v5.6.0
VS Code Jupyter Environment
How it is now
fig = px.scatter(result_df, x=[1, 2, 2, 3], y=[1, 2, 3, 4])
fig.update_traces(mode="markers", hovertemplate=None)
fig.update_layout(hovermode="x unified")
fig.show()
As shown above, the hover box only displayed 1 y-axis value.
How it should be
The hover box should display all y-axis values at the same X, even if they are the same type, in my example scatter plot.
As demonstrated in the document, plotly has the capability to show all values at the same X. But unfortunately it only works when there are another data dimension involved.
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.
Research direction
Start with the minimal Python reproduction using px.scatter, update_traces, and hovermode="x unified", then compare its behavior with the linked hover-text documentation. Investigate why repeated points at the same X produce only one Y value in the hover box. Done means the hover box displays every Y-axis value at that X for the example case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100