Skip to content

ggplotly tool tip disappearing for some points #1742

Open
@wdm0336

Description

@wdm0336

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")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions