enable multiple hover boxes for overlapping/multiple points
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
This has been tested in version 4.7.1.
When hover information is shown for points e.g. in a scatter plot, the following situations can occur:
- there are multiple points on exactly the same coordinates
- there are multiple points close to the same coordinates and the markers used to visualize those points overlap in the graph
Hover information for all those multiple points should be shown, especially in cases where the hover information includes additional data not shown directly in the graph.
The hvPlot library does this correctly: it shows stacked hover boxes for all the data points under the cursor. Plotly only shows one hover box and it is not clear which one.
I think this is an actual bug since it makes it easy to miss data and the hover information does not represent the actual data in the graph.
Here is an example using the Iris data set and Plotly:
import plotly.express as px
from bokeh.sampledata import iris
df = iris.flowers.copy()
fig = px.scatter(df, x="sepal_length", y="sepal_width", color="species",
opacity=0.4, hover_data=["petal_length", "petal_width"]
)
fig.show()
This shows:

With hvPlot:
df.hvplot(kind="scatter",
x="sepal_length", y="sepal_width", by="species",
hover_cols=["petal_length", "petal_width"],
alpha=0.4)

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 by reproducing the overlapping-point behavior with the provided iris dataset and px.scatter example, then compare it with the hvPlot result. Trace how fig.show() renders hover information for coincident or overlapping points and determine the relevant Plotly component boundary. Done means all points under the cursor receive distinguishable hover information, with regression coverage for both exact and nearby overlaps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100