addMarkPoint: Add 'markPoint' to An Echarts Object

Description Usage Arguments References See Also Examples

View source: R/options.R

Description

Add markPoint 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
addMarkPoint(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = "pin", symbolSize = 10,
  symbolRotate = NULL, large = FALSE, effect = list(show = FALSE),
  itemStyle = NULL, ...)

addMP(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = "pin", symbolSize = 10,
  symbolRotate = NULL, large = FALSE, effect = list(show = FALSE),
  itemStyle = NULL, ...)

addMarkpoint(chart, series = NULL, timeslots = NULL, data = NULL,
  clickable = TRUE, symbol = "pin", symbolSize = 10,
  symbolRotate = NULL, large = FALSE, effect = list(show = FALSE),
  itemStyle = NULL, ...)

overideMarkPoint(chart, ...)

overideMarkpoint(chart, ...)

overideMP(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 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 markPoints. It must contain the following columns: name, and/or value | type and/or x | xAxis, y | yAxis and/or series.

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

generic

generic form is columns [name, x, y] or [name, value, x, y]

scatter, line, bar

[name, value, x, y] or [name, type] (type can only be 'max' or 'min') or [name, value, xAxis, yAxis]

k, eventRiver

[name, value, x, y] or [name, value, xAxis, yAxis]

map

[name, value]. You need to pass in [name, lng, lat] using addGeoCoord separately.

Note that markLine dataset is compatible with addMarkPoint.

  • x1, x2 are treated as x (keep the first detected one only)

  • y1, y2 are treated as y (keep the first detected one only)

  • xAxis1, xAxis2 are treated as xAxis (keep the first detected one only)

  • yAxis1, yAxis2 are treated as yAxis (keep the first detected one only

clickable

Logical, if the points are clickable. Default TRUE.

symbol

Symbol of the markpoints, refer to recharts:::validSymbols. Default 'pin'.

symbolSize

Numeric or vector c(height, width) or JS function. Default 10.

symbolRotate

Numeric -180 ~ 180. Default NULL.

large

Logical if large effect is on. Default FALSE.

effect

List. effect configurator of markPoints. Default NULL, which is list(show=FALSE, type='scale', loop=TRUE, period=15, scaleSize=2, bounceDistance=10, color=NULL, shadowColor=NULL, shadowBlur=0)

itemStyle

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

...

Elipsis

mode

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

References

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

See Also

addMarkLine addMarkline

Examples

1
2
3
4
5
6
## Not run: 
g = echartr(iris, Sepal.Width, Petal.Width, Species)
g %>% addMP(c('setosa', 'versicolor'), data=data.frame(name=c('max', 'min'),
           type=c('max', 'min'), series=c('setosa', 'versicolor')))

## End(Not run)

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