addMarkLine: Add 'markLine' to An Echarts Object

Description Usage Arguments References Examples

View source: R/options.R

Description

Add markLine to An Echarts Object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
addMarkLine(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = c("circle", "arrow"), symbolSize = c(2, 4),
  symbolRotate = NULL, large = FALSE, smooth = FALSE, smoothness = 0.2,
  precision = 2, bundling = list(enable = FALSE, maxTurningAngle = 45),
  effect = list(show = FALSE), itemStyle = NULL, mode = c("add",
  "overide"), ...)

addML(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = c("circle", "arrow"), symbolSize = c(2, 4),
  symbolRotate = NULL, large = FALSE, smooth = FALSE, smoothness = 0.2,
  precision = 2, bundling = list(enable = FALSE, maxTurningAngle = 45),
  effect = list(show = FALSE), itemStyle = NULL, mode = c("add",
  "overide"), ...)

addMarkline(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = c("circle", "arrow"), symbolSize = c(2, 4),
  symbolRotate = NULL, large = FALSE, smooth = FALSE, smoothness = 0.2,
  precision = 2, bundling = list(enable = FALSE, maxTurningAngle = 45),
  effect = list(show = FALSE), itemStyle = NULL, mode = c("add",
  "overide"), ...)

overideMarkLine(chart, ...)

overideMarkline(chart, ...)

overideML(chart, ...)

Arguments

chart

echarts object generated by echart or echartR

series

Numeric (series index) or character (series name), numeric preferred. If set NULL, then apply the markPoint to all the series.

timeslots

Numeric (timeslot index) or character (timeslot name), numeric is preferred. If set NULL, then apply the markPoint to all the timeslots. You can use t for short.

data

Data.frame, the data of the markLines. It must contain the following columns: name1, name2, value | type and/or x1 | xAxis1, y1 | yAxis1, x2 | xAxis2, y2 | yAxis2 and/or series.

When series is given, it must be cooresponding to the series argument.

generic

generic form is columns [name1, name2, value, x1, y1, x2, y2]. The minimum form is [name1, x1, y1, x2, y2]

scatter, line, bar

[name1, name2, value, x1, y1, x2, y2] or [name1, type] (type can only be 'max', 'min' or 'average') or [name1, name2, value, xAxis1, yAxis1, xAxis2, yAxis2]

k, eventRiver

[name1, name2, value, x1, y1, x2, y2] or [name1, name2, value, xAxis1, yAxis1, xAxis2, yAxis2]

map

[name1, name2, value]. You need to pass in [name1, lng1, lat1], [name2, lng2, lat2] using addGeoCoord separately.

clickable

Logical, if the graphs are clickable. Default TRUE.

symbol

Symbol vector of the markLines, refer to recharts:::validSymbols. Default c('circle', 'arrow').

symbolSize

Numeric vector or JS function defining the size of the the beginning symbol and the end symbol of the marklines. Default c(2, 4).

symbolRotate

Numeric -180 ~ 180. Default NULL.

large

Logical if large effect is on. Default FALSE.

effect

List. effect configurator of markLines. Default NULL, which is list(show=FALSE, loop=TRUE, period=15, scaleSize=2, color=NULL, shadowColor=NULL, shadowBlur=0)

itemStyle

List. It is a list with the structure list(normal=list(...), emphasis=list(...)). Default NULL.

mode

'add' or 'overide' the data part of markLine to the echarts object. Default 'add'. You can use overideMarkLine to overide the data of the existing markLine.

...

Elipsis

References

http://echarts.baidu.com/echarts2/doc/option.html#tooltip-line1~series-i(line).markLine

Examples

1
2
3
4
5
6
## Not run: 
g = echartr(iris, Sepal.Width, Petal.Width, Species)
g %>% addML(c('setosa', 'versicolor'), data=data.frame(name1=rep('mean', 2),
           type=rep('average', 2), series=c('setosa', 'versicolor')))

## End(Not run)

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