extract_tt_data_row: Tooltip data

Description Usage Arguments Details Value

View source: R/tooltip.R

Description

Prepares data in order that it may be displayed in tooltip. The row from the data which fits to the hover the most will be selected.

Usage

1
2
3
4
5
6
7
extract_tt_data_row(
  hv,
  plot_info,
  plot_data,
  plot_type = "geom_point",
  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_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 filters one row of the imputed data in order that it corresponds the most to the hoover coordinates.

Value

prepare_tt_data returns prepared data frame containing one record.


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