init: Initialise

Description Usage Arguments Timeline Examples

Description

Initialise a chart.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
e_charts(data, x, width = NULL, height = NULL, elementId = NULL,
  dispose = TRUE, draw = TRUE, renderer = "canvas",
  timeline = FALSE, ...)

e_charts_(data, x = NULL, width = NULL, height = NULL,
  elementId = NULL, dispose = TRUE, draw = TRUE,
  renderer = "canvas", timeline = FALSE, ...)

e_chart(data, x, width = NULL, height = NULL, elementId = NULL,
  dispose = TRUE, draw = TRUE, renderer = "canvas",
  timeline = FALSE, ...)

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.

draw

Whether to draw the chart, intended to be used with e_draw_p.

renderer

Renderer, takes canvas (default) or svg.

timeline

Set to TRUE to build a timeline, see timeline section.

...

Any other argument.

e

An object of class echarts4r as returned by e_charts.

Timeline

The timeline feature currently supports the following chart types.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mtcars %>% 
  e_charts(qsec) %>%
  e_line(mpg)

points <- mtcars[1:3,]
mtcars %>% 
  e_charts_("qsec") %>%
  e_line(mpg) %>%
  e_data(points, qsec) %>%
  e_scatter(mpg, color = "blue")

JohnCoene/echarts4r documentation built on Sept. 18, 2019, 2:24 a.m.