getSvgAndTooltipdata: Render SVG object and return it with tooltip data

View source: R/main.R

getSvgAndTooltipdataR Documentation

Render SVG object and return it with tooltip data

Description

Render SVG object and return it with tooltip data

Usage

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

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. if argument is NULL it will not generate tooltip data, that may speed up generating of plots.

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.