0

Since updating my packages, I've been getting strange behavior when hovering over lines created by geom_line_interactive(). Lines get the hover effect even when the mouse is far from the line, and sometimes the line won't get the hover effect when the mouse is directly over it. This seems to only be a problem for line geoms; bars, points, etc. work fine.

See example below:

library(tidyverse)
library(ggiraph)

df = tibble(
  x = rep(1:5, 4),
  y = c(1:5, (1:5)^2, 4,2,1,2,4, 5,7,8,7,5),
  group = as.character(sort(rep(1:4, 5))),
  color = as.character(sort(c(rep(1, 15), rep(2, 5))))
)

gg = ggplot(df, aes(x, y, color = color, group = group, data_id = group, tooltip = group))

girafe(ggobj = gg + geom_line_interactive() + geom_point_interactive()) # Causes a problem
girafe(ggobj = gg + geom_line_interactive()) # Still causes a problem
girafe(ggobj = gg + geom_point_interactive()) # No problem

Version numbers:
tidyverse - 1.3.2 (includes ggplot2 - 3.4.0)
ggiraph - 0.8.5
R - 4.2.2

0 Answers0