Skip to contents

Function to flip the x and y axes

Usage

flipAxis(myIO, flipAxis = TRUE)

Arguments

myIO

an htmlwidget object created by the myIO() function

flipAxis

a logical argument (TRUE) for flipping the x and y axes

Value

the same myIO object

Examples

# Flip the axes for a horizontal bar chart
myIO() |>
  addIoLayer(
    type = "bar", color = "steelblue", label = "bars",
    data = mtcars, mapping = list(x_var = "wt", y_var = "mpg")
  ) |>
  flipAxis()