0

I would like to make the labels on the x-axis interactive in ggiraph. Can it be done?

Is there any way to use scale_discrete_manual_interactive to accomplish this?

library(tidyverse)
library(ggiraph)
my_df <-
  tibble(x=letters[1:5],y=1:5)
my_df |>
  ggplot(aes(x,y)) +
  geom_col_interactive(aes(data_id=x,
                           tooltip=paste(x,y))) ->
  p
  p_obj <- girafe(ggobj = p,
                  height_svg = 3) 
  p_obj
Erich Neuwirth
  • 943
  • 7
  • 13

0 Answers0