Skip to contents

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

Usage

setToggle(myIO, variable, format = NULL)

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

Value

the same myIO object

Examples

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