library(ggplot2)
library(ggiraph)
gg_jitter <- ggplot(
mpg, aes(cyl, hwy, group = cyl)) +
geom_boxplot() +
labs(title =
label_interactive(
"title",
data_id = "id_title",
onclick = "alert(\"title\")",
tooltip = "title" )
) +
theme(plot.title = element_text_interactive())
x <- girafe(ggobj = gg_jitter)
if( interactive() ) print(x)
Run the code above in your browser using DataLab