e_flip_coords: Flip coordinates

View source: R/opts.R

e_flip_coordsR Documentation

Flip coordinates

Description

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

echarts4r documentation built on July 9, 2023, 7:26 p.m.