Learn R Programming

myIO (version 1.2.0)

setToggle: Set Toggle Interaction

Description

Sets toggle options for y_var and adds a toggle button for chart

Usage

setToggle(myIO, variable, format = NULL)

Value

A modified myIO htmlwidget object with toggle interaction configured.

Arguments

myIO

an htmlwidget object created by the myIO() function

variable

a string indicating the variable name in data for toggle

format

a string indicating the format for the toggled variable

Examples

Run this code
# Add a toggle button to switch y variable
myIO() |> setToggle(variable = "Percent", format = ".0%")

Run the code above in your browser using DataLab