ggiraph (version 0.5.0)

opts_hover: hover effect settings

Description

Allows customization of the animation of graphic elements on which the mouse is positioned.

Usage

opts_hover(css = NULL)

Arguments

css

css to associate with elements to be animated when mouse is hover them.

See Also

set options with girafe_options

Other girafe animation options: opts_selection, opts_toolbar, opts_tooltip, opts_zoom

Examples

Run this code
# NOT RUN {
library(ggplot2)

dataset <- mtcars
dataset$carname = row.names(mtcars)

gg <- ggplot(
  data = dataset,
  mapping = aes(x = wt, y = qsec, color = disp,
                tooltip = carname, data_id = carname) ) +
  geom_point_interactive() + theme_minimal()

x <- girafe(ggobj = gg)
x <- girafe_options(x,
  opts_hover(css = "fill:wheat;stroke:orange;r:5pt;") )
if( interactive() ) print(x)
# }

Run the code above in your browser using DataLab