powered by
Sets toggle options for y_var and adds a toggle button for chart
setToggle(myIO, variable, format = NULL)
A modified myIO htmlwidget object with toggle interaction configured.
myIO
an htmlwidget object created by the myIO() function
a string indicating the variable name in data for toggle
a string indicating the format for the toggled variable
# Add a toggle button to switch y variable myIO() |> setToggle(variable = "Percent", format = ".0%")
Run the code above in your browser using DataLab