Learn R Programming

echarts4r (version 0.2.0)

e_axis: Axis

Description

Customise axis.

Usage

e_axis(e, axis = c("x", "y", "z"), index = 0, ...)

e_x_axis(e, index = 0, ...)

e_y_axis(e, index = 0, ...)

e_z_axis(e, index = 0, ...)

e_rm_axis(e, axis = c("x", "y", "z"))

Arguments

e

An echarts4r object as returned by e_charts.

axis

Axis to customise.

index

Index of axis to customise.

...

Any other option to pass, check See Also section.

Functions

  • e_axis to customise axis

  • e_rm_axis to remove axis

See Also

Additional x arguments, Additional y arguments

Examples

Run this code
# NOT RUN {
USArrests %>% 
  e_charts(Assault) %>% 
  e_line(Murder, smooth = TRUE) %>% 
  e_line(Rape, y.index = 1) %>% # add secondary axis
  e_y_axis(index = 1, show = FALSE) # hide secondary axis

# plot all labels & rotate
USArrests %>% 
  head(10) %>% 
  dplyr::mutate(State = row.names(.)) %>% 
  e_charts(State) %>% 
  e_area(Murder) %>% 
  e_x_axis(axisLabel = list(interval = 0, rotate = 45)) # rotate
  
# }

Run the code above in your browser using DataLab