action_toggle_visibility: Toggle Visibility

Description Usage Arguments Examples

View source: R/actions.R

Description

Toggle the visibily of a chart.

Usage

1

Arguments

g

An object of class g2r or g2Proxy as returned by g2() or g2_proxy().

btn

Id of the input_button that toggles the visibility.

Examples

1
2
3
4
5
6
# works in Rmarkdown
input_button("toggle", "Show/hide chart")

g2(mtcars, asp(qsec, mpg)) %>%
  fig_point() %>%
  action_toggle_visibility("toggle")

devOpifex/g2r documentation built on Jan. 16, 2022, 12:36 a.m.