plotly / plotly/plotly.R

ggplotly tool tip disappearing for some points

Open
#1,742 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

reproducible example needed
Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

Developing a Shiny app in R3.6.3 with ggplotly version4.9.2.

Plotting a scatter plot from ggplotly with tooltip of each point.

As the tool tip for each point grows larger (more rows), the points toward the top of the graph lose the tooltip even if the tool tip is the same for each point.

If the tooltip is the same, why do some points lose the tool tip and others can display it?

In the code below vary numRows or the size of the plot and points from top towards the bottom lose the tooltip.

numRows = 20

ggiris <- ggplot(data = iris,
                 aes(x = Petal.Width,
                     y = Sepal.Length,
                     color = Species,
                     text = paste(rep(LETTERS, length.out = numRows), collapse = "<br>"))) +
  geom_point()

ggplotly(ggiris, tooltip = "text")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided R ggplotly example and vary numRows and the plot size to reproduce the missing tooltips. Trace how ggplotly renders large tooltip content for points near the top of the graph; done means every point retains its tooltip when the tooltip text is identical.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.