Skip to contents

Flip cartesian 2D coordinates.

Usage

e_flip_coords(e)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

Examples

df <- data.frame(
  x = LETTERS[1:5],
  y = runif(5, 1, 5),
  z = runif(5, 3, 10)
)

df |>
  e_charts(x) |>
  e_bar(y) |>
  e_line(z) -> plot

plot # normal
e_flip_coords(plot) # flip