forked from davidgohel/ggiraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgirafe_options.Rd
57 lines (51 loc) · 1.52 KB
/
girafe_options.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/girafe_options.R
\name{girafe_options}
\alias{girafe_options}
\title{Set girafe options}
\usage{
girafe_options(x, ...)
}
\arguments{
\item{x}{girafe object.}
\item{...}{set of options defined by calls to \code{opts_*} functions or
to sizingPolicy from htmlwidgets (this won't have any effect within a
shiny context).}
}
\description{
Defines the animation options related to
a \code{\link[=girafe]{girafe()}} object.
}
\examples{
library(ggplot2)
library(htmlwidgets)
dataset <- mtcars
dataset$carname = row.names(mtcars)
gg_point = 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_point)
x <- girafe_options(x = x,
opts_tooltip(opacity = .7),
opts_zoom(min = .5, max = 4),
sizingPolicy(defaultWidth = "100\%", defaultHeight = "300px"),
opts_hover(css = "fill:red;stroke:orange;r:5pt;") )
if(interactive()){
print(x)
}
}
\seealso{
\code{\link[=girafe]{girafe()}}, \code{\link[=girafe_css]{girafe_css()}}, \code{\link[=girafe_css_bicolor]{girafe_css_bicolor()}}
Other girafe animation options:
\code{\link{girafe_defaults}()},
\code{\link{init_girafe_defaults}()},
\code{\link{opts_hover}()},
\code{\link{opts_selection}()},
\code{\link{opts_sizing}()},
\code{\link{opts_toolbar}()},
\code{\link{opts_tooltip}()},
\code{\link{opts_zoom}()},
\code{\link{set_girafe_defaults}()}
}
\concept{girafe animation options}