output_info: Add a tooltip-like display to a website

View source: R/output_info.R

output_infoR Documentation

Add a tooltip-like display to a website

Description

Adds an output to display information about a hovered-over or selected data point.

Usage

output_info(title = NULL, body = NULL, row_style = "table",
  default = NULL, dataview = NULL, variable = NULL, subto = NULL,
  id = NULL, variable_info = TRUE, floating = FALSE)

Arguments

title

Title text, or the source of title text.

body

A list of entries in the info body section, which can be raw text or references to features or data variables.

row_style

A character specifying how rows should be displayed: "table" (default) to place names and values in separate columns of a table row, or "stack" to place names over values. Repeats over rows.

default

A list with entries for "title" and "body", which are treated as raw text.

dataview

The ID of a dataview, used for the persistent display.

variable

Name of the variable from which to display variable information and values. If not specified, this will default to the coloring variable of maps and plots, or the y variable of a dataview.

subto

A vector of output IDs to receive hover events from.

id

Unique id of the element.

variable_info

Logical; if TRUE (default), variable names can be clicked for more information.

floating

Logical; if TRUE, the information pane will appear next to the cursor.

Value

A character vector of the content to be added.

Examples

## Not run: 
output_info("Initial View", "Hover over plot elements for more information.")

## End(Not run)

uva-bi-sdad/community documentation built on Oct. 12, 2023, 1:18 p.m.