eChart: Create an ECharts widget

Description Usage Arguments References Examples

Description

Create an HTML widget for ECharts that can be rendered in the R console, R Markdown documents, or Shiny apps. You can add more components to this widget and customize options later using <setEchartWidgets> functions, <aesthetic> functions, and others.. eChart() is an alias of echart().

Create an ECharts widget

Create an ECharts widget

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
echart(data, ...)

## S3 method for class 'list'
echart(data, width = NULL, height = NULL, ...)

## S3 method for class 'data.frame'
echart(data, x = NULL, y = NULL, series = NULL,
  t = NULL, weight = NULL, facet = NULL, lat = NULL, lng = NULL,
  type = "auto", subtype = NULL, ...)

## Default S3 method:
echart(data, x = NULL, y = NULL, series = NULL,
  t = NULL, weight = NULL, facet = NULL, lat = NULL, lng = NULL,
  type = "auto", subtype = NULL, ...)

eChart(data, ...)

Arguments

data

a data object (usually a data frame or a list)

...

Other params to pass to echarts object

width

width

height

height

x

independent variable(s). Some charts calls for one, some calls for two.

y

dependent variable(s). Most charts calls for one, but some calls for more.

series

data series variables.

single coordinate system

In Cartesian Coordinate System (bar, scatter, k, ...) and some other charts (venn), series represents data series. Different data series are displayed in the same coordinate system

multiple coordinate system

In polar coordinate system (pie, radar, ...) and some other charts (map, tree, ...), series represents index of coordinate system. Different coordinate system indices are displayed in paralell coordinate systems.

t

timeline variable. When t is defined, recharts2 builds a timeline widget to show the changes along with time.

weight

In some charts (bar, bubble, line, ...), weight represents the size of the graph elements.

facet

The variable as factor mapping to facets.

lat

latitude variable (-180 ~ 180) for map/heatmap

lng

longitude variable (-90 ~ 90) for map/heatmap

type

chart type. Now recharts2 supports major types of

subtype

some chart types support subtypes.

bar/column

"stack"

histogram

c("count","freq","density")

line/area

c("stack","smooth","dotted","solid","dashed")

curve/wave

c("stack","solid")

map_world/world_map/map_world_multi/world_map_multi

c("sum","average", [Valid Country Names])

map_china/china_map/map_china_multi/china_map_multi

c("sum","average", [Valid China Province Names])

pie

c("multi","clock","clockwise")

ring

c("info","multi","clock","clockwise")

rose

c("area","radius","multi","clock","clockwise")

chord

c("ribbon","scale","scaletext","rotatelab","hidelab","clock", "clockwise","asc","desc","ascsub","descsub")

force/force_line

c("arrow","triangle")

funnel/pyramid

c("left","center","right")

tree/vtree/htree/tree_inv/vtree_inv/htree_inv

c("curve","broken", "dotted","solid","dashed")

radar/spider/star

"fill"

References

Online Manual: http://madlogos.github.io/recharts2

Examples

1
2
3
library(recharts2)
echart(iris, ~ Sepal.Length, ~ Sepal.Width)
echart(iris, ~ Sepal.Length, ~ Sepal.Width, series = ~ Species)

madlogos/recharts2 documentation built on May 21, 2019, 11:03 a.m.