beam_tooltip: Generate tooltip

Description Usage Arguments Details

View source: R/tooltip.R

Description

Generates tooltip for plot.

Usage

1
beam_tooltip(hv, plot_info, plot_data, plot_type, tt_content, tt_range = 5)

Arguments

hv

Hoover.

plot_info

chosen mapping from the data object from the output of ggplot_build for displayed plot.

plot_data

data on which the ggplot is based

plot_type

Type of plot corresponding to the data from first mapping. Accepts either 'geom_point', 'geom_segment' or 'geom_col'. Default 'geom_point'.

tt_content

Optional. If NULL in the tooltip will be displayed names of columns with corresponding values from data. One can customize tooltip content adding parameter tt_content here. It should be a list of chosen_cols and row_text. To display some values from the data in the content one should reference to the relevant column from the chosen_cols and in row_text write appropriate type of that variable like in the function sprintf (for example '%s' in case when chosen variable is a character string).

tt_range

A number denoting maximum distance between hoover and objects on the plot. The row, whose distance to the hoover is less than tt_range will be selected from the whole data. Default 5.

Details

This function uses extract_tt_data_row.


BioGenies/shinydetails documentation built on March 1, 2021, 11:12 p.m.