Toggle the visibily of a chart.
action_toggle_visibility(g, btn)
g | An object of class |
---|---|
btn | Id of the input_button that toggles the visibility. |
# works in Rmarkdown input_button("toggle", "Show/hide chart") g2(mtcars, asp(qsec, mpg)) %>% fig_point() %>% action_toggle_visibility("toggle")