interactive_rect_grob
From ggiraph v0.3.1
by David Gohel
Generate interactive grob rectangles
This function can be used to generate interactive grob rectangles.
Usage
interactive_rect_grob(x = unit(0.5, "npc"), y = unit(0.5, "npc"), width = unit(1, "npc"), height = unit(1, "npc"), tooltip = NULL, onclick = NULL, data_id = NULL, just = "centre", hjust = NULL, vjust = NULL, default.units = "npc", name = NULL, gp = gpar(), vp = NULL)
Arguments
- x
- A numeric vector or unit object specifying x-location.
- y
- A numeric vector or unit object specifying y-location.
- width
- A numeric vector or unit object specifying width.
- height
- A numeric vector or unit object specifying height.
- tooltip
- tooltip associated with rectangles
- onclick
- javascript action to execute when rectangle is clicked
- data_id
- identifiers to associate with rectangles
- just
- The justification of the rectangle
relative to its (x, y) location. If there are two values, the first
value specifies horizontal justification and the second value specifies
vertical justification. Possible string values are:
"left"
,"right"
,"centre"
,"center"
,"bottom"
, and"top"
. For numeric values, 0 means left alignment and 1 means right alignment. - hjust
- A numeric vector specifying horizontal justification.
If specified, overrides the
just
setting. - vjust
- A numeric vector specifying vertical justification.
If specified, overrides the
just
setting. - default.units
- A string indicating the default units to use
if
x
,y
,width
, orheight
are only given as numeric vectors. - name
- A character identifier.
- gp
- An object of class
gpar
, typically the output from a call to the functiongpar
. This is basically a list of graphical parameter settings. - vp
- A Grid viewport object (or NULL).
Community examples
Looks like there are no examples yet.