Learn R Programming

echarts4r (version 0.0.1)

e_charts: Initialise

Description

Initialise a chart.

Usage

e_charts(data, x, width = NULL, height = NULL, elementId = NULL,
  dispose = TRUE, ...)

e_chart(data, x, width = NULL, height = NULL, elementId = NULL, dispose = TRUE, ...)

e_data(e, data, x)

Arguments

data

A data.frame.

x

Column name containing x axis.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

elementId

Id of element.

dispose

Set to TRUE to force redraw of chart, set to FALSE to update.

...

Any other argument.

e

An object of class echarts4r as returned by e_charts.

Examples

Run this code
# NOT RUN {
USArrests %>% 
  dplyr::mutate(
    state = row.names(.)
  ) %>% 
  e_charts(state) %>%
  e_line(Rape)

# }

Run the code above in your browser using DataLab