ggiraph (version 0.6.1)

interactive_polygon_grob: Generate interactive grob polygons

Description

This function can be used to generate interactive grob polygons.

Usage

interactive_polygon_grob(x = unit(c(0, 1), "npc"), y = unit(c(0, 1),
  "npc"), id = NULL, id.lengths = NULL, tooltip = NULL,
  onclick = NULL, data_id = NULL, default.units = "npc",
  name = NULL, gp = gpar(), vp = NULL)

Arguments

x

A numeric vector or unit object specifying x-locations.

y

A numeric vector or unit object specifying y-locations.

id

A numeric vector used to separate locations in x and y into multiple polygons. All locations with the same id belong to the same polygon.

id.lengths

A numeric vector used to separate locations in x and y into multiple polygons. Specifies consecutive blocks of locations which make up separate polygons.

tooltip

tooltip associated with polygons

onclick

javascript action to execute when polygon is clicked

data_id

identifiers to associate with polygons

default.units

A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.

name

A character identifier.

gp

An object of class gpar, typically the output from a call to the function gpar. This is basically a list of graphical parameter settings.

vp

A Grid viewport object (or NULL).