renderWithTooltips: Render plot with tooltips

View source: R/main.R

renderWithTooltipsR Documentation

Render plot with tooltips

Description

Render plot with tooltips

Usage

renderWithTooltips(
  plot,
  varDict,
  plotScales = NULL,
  callback = NULL,
  point.size = 10,
  dpi = 72,
  width = NA,
  height = NA,
  customGrob = NULL,
  ...
)

Arguments

plot

A ggplot object.

varDict

Variable dictionary in the following format: list(<variable> = <label>, ...), where <variable> is a valid name of a variable mapped with aes, and <label> is a character string. It defines the composition of information displayed in tooltips.

plotScales

A list with two fields: x and y. Defines axis scales (transformations) for the purpose of displaying original values in tooltips. If NULL (default), values are displayed "as is".

callback

Callback function for adding custom content to the tooltips (see the example app).

point.size

Point size for calibrating hovering accuracy (optional).

dpi

DPI value (optional).

width

Plot width (in inches; optional).

height

Plot height (in inches; optional).

customGrob

optional grob object. It allows to pass original plot with grob manipulations.

...

Additional parameters passed to ggsave.

Note

Non-numeric variables are only back-transformed to their original values if they are passed to ggplot as factors.


Roche/ggtips documentation built on May 14, 2022, 12:44 p.m.