Skip to contents

girafe animation options (see girafe_defaults()) are automatically applied to every girafe you produce. Use set_girafe_defaults() to override them. Use init_girafe_defaults() to re-init all values with the package defaults.

Usage

set_girafe_defaults(
  fonts = NULL,
  opts_sizing = NULL,
  opts_tooltip = NULL,
  opts_hover = NULL,
  opts_hover_key = NULL,
  opts_hover_inv = NULL,
  opts_hover_theme = NULL,
  opts_selection = NULL,
  opts_selection_inv = NULL,
  opts_selection_key = NULL,
  opts_selection_theme = NULL,
  opts_zoom = NULL,
  opts_toolbar = NULL
)

Arguments

fonts

default values for fonts, see argument fonts of dsvg() function.

opts_sizing

default values for opts_sizing() used in argument options of girafe() function.

opts_tooltip

default values for opts_tooltip() used in argument options of girafe() function.

opts_hover

default values for opts_hover() used in argument options of girafe() function.

opts_hover_key

default values for opts_hover_key() used in argument options of girafe() function.

opts_hover_inv

default values for opts_hover_inv() used in argument options of girafe() function.

opts_hover_theme

default values for opts_hover_theme() used in argument options of girafe() function.

opts_selection

default values for opts_selection() used in argument options of girafe() function.

opts_selection_inv

default values for opts_selection_inv() used in argument options of girafe() function.

opts_selection_key

default values for opts_selection_key() used in argument options of girafe() function.

opts_selection_theme

default values for opts_selection_theme() used in argument options of girafe() function.

opts_zoom

default values for opts_zoom() used in argument options of girafe() function.

opts_toolbar

default values for opts_toolbar() used in argument options of girafe() function.

Examples

library(ggplot2)

set_girafe_defaults(
  opts_hover = opts_hover(css = "r:10px;"),
  opts_hover_inv = opts_hover_inv(),
  opts_sizing = opts_sizing(rescale = FALSE, width = .8),
  opts_tooltip = opts_tooltip(opacity = .7,
                              offx = 20, offy = -10,
                              use_fill = TRUE, use_stroke = TRUE,
                              delay_mouseout = 1000),
  opts_toolbar = opts_toolbar(position = "top", saveaspng = FALSE),
  opts_zoom = opts_zoom(min = .8, max = 7)
)

init_girafe_defaults()