You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/echarty.R
+46-41Lines changed: 46 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -11,27 +11,16 @@
11
11
#' If the grouping is on multiple columns, only the first one is used.
12
12
#' @param preset Disable(FALSE) or enable (TRUE, default) presets xAxis,yAxis,serie for 2D, or grid3D,xAxis3D,yAxis3D,zAxis3D for 3D.
13
13
#' @param load Name(s) of plugin(s) to load. Could be a character vector or comma-delimited string. default NULL.\cr
14
-
#' [ec.plugjs] will be called internally for each entry, popup prompts controlled by parameter \emph{ask}. \cr
15
-
#' Built-in plugins: \cr \itemize{
16
-
#' \item leaflet - Leaflet maps with customizable tiles, see \href{https://github.com/gnijuohz/echarts-leaflet#readme}{source}\cr
17
-
#' \item custom - renderers for [ecr.band] and [ecr.ebars] \cr
18
-
#' } Plugins with one-time installation: \cr \itemize{
19
-
#' \item 3D - 3D charts and WebGL acceleration, see \href{https://github.com/ecomfe/echarts-gl}{source} and \href{https://echarts.apache.org/en/option-gl.html#series}{docs} \cr
20
-
#' \item world - world map with country boundaries, see \href{https://github.com/apache/echarts/tree/master/test/data/map/js}{source} \cr
21
-
#' \item liquid - liquid fill, see \href{https://github.com/ecomfe/echarts-liquidfill}{source} \cr
22
-
#' \item gmodular - graph modularity, see \href{https://github.com/ecomfe/echarts-graph-modularity}{source} \cr
23
-
#' \item wordcloud - cloud of words, see \href{https://github.com/ecomfe/echarts-wordcloud}{source} \cr
24
-
#' } or install you own third-party plugins.
25
14
#' @param width,height A valid CSS unit (like \code{'100\%'},
26
15
#' \code{'500px'}, \code{'auto'}) or a number, which will be coerced to a
27
16
#' string and have \code{'px'} appended.
28
-
#' @param timeline A list to build a timeline or NULL(default). The list defines timeline series and their \href{https://echarts.apache.org/en/option.html#series}{parameters}. \cr
29
-
#' The only required series parameter is \href{https://echarts.apache.org/en/option.html#series-line.encode}{encode}.
17
+
#' @param tl.series A list to build a timeline or NULL(default). The list defines options \href{https://echarts.apache.org/en/option.html#series}{series} and their attributes. \cr
18
+
#' The only required attribute is \href{https://echarts.apache.org/en/option.html#series-line.encode}{encode}.
30
19
#' \emph{encode} defines which data columns names(not indexes) to use for axes X and Y: \cr
31
20
#' Set \emph{x} and \emph{y} when coordinateSystem is \emph{'cartesian2d'}, \cr
32
21
#' Set \emph{lng} and \emph{lat} when coordinateSystem is \emph{'geo'}, \cr
33
22
#' Set \emph{radius} and \emph{angle} when coordinateSystem is \emph{'polar'}.\cr
34
-
#' Parameter \emph{coordinateSystem} is set to \emph{'cartesian2d'} by default.
23
+
#' Attribute \emph{coordinateSystem} is set to \emph{'cartesian2d'} by default. Auto-generated \emph{timeline} and \emph{options} will be preset for the chart as well.
35
24
#' @param ... other arguments to pass to the widget. \cr
36
25
#' Custom widget arguments include: \cr \itemize{
37
26
#' \item js - a string with a Javascript expression to evaluate
@@ -47,14 +36,26 @@
47
36
#' Plugin '3D' presets will not work for 'scatterGL'. Instead, use \emph{preset=FALSE} and set explicitly \emph{xAxis,yAxis}. \cr
48
37
#' Plugins 'leaflet' and 'world' preset zoom=6 and center to the mean of all coordinates. \cr
49
38
#' Users can delete or overwrite any presets as needed. \cr
39
+
#' [ec.plugjs] will be called internally for each \emph{load} entry, popup prompts controlled by parameter \emph{ask}. \cr
40
+
#' Built-in plugins: \cr \itemize{
41
+
#' \item leaflet - Leaflet maps with customizable tiles, see \href{https://github.com/gnijuohz/echarts-leaflet#readme}{source}\cr
42
+
#' \item custom - renderers for [ecr.band] and [ecr.ebars] \cr
43
+
#' } Plugins with one-time installation: \cr \itemize{
44
+
#' \item 3D - 3D charts and WebGL acceleration, see \href{https://github.com/ecomfe/echarts-gl}{source} and \href{https://echarts.apache.org/en/option-gl.html#series}{docs} \cr
45
+
#' \item world - world map with country boundaries, see \href{https://github.com/apache/echarts/tree/master/test/data/map/js}{source} \cr
46
+
#' \item liquid - liquid fill, see \href{https://github.com/ecomfe/echarts-liquidfill}{source} \cr
47
+
#' \item gmodular - graph modularity, see \href{https://github.com/ecomfe/echarts-graph-modularity}{source} \cr
48
+
#' \item wordcloud - cloud of words, see \href{https://github.com/ecomfe/echarts-wordcloud}{source} \cr
49
+
#' } or install you own third-party plugins.
50
+
#' Parameter 'js' accepts a vector of one or two strings. The first one is executed before chart initialization, the second - after. Chart object 'opts' is exposed in the second script.
50
51
#'
51
52
#' @examples
52
53
#' # basic scatter chart from a data.frame, using presets
53
54
#' cars %>% ec.init()
54
55
#'
55
56
#' # a timeline with two series and autoPlay
56
57
#' p <- iris %>% dplyr::group_by(Species) %>% ec.init(
#' @param header Whether the data will have a header with column names or not, default TRUE. Set this to FALSE when used in \href{https://echarts.apache.org/en/option.html#series-scatter.data}{series.data}.
401
406
#' @return A list for \emph{dataset.source}, \emph{series.data} or a list of named lists.
402
407
#'
408
+
#' @seealso some live \href{https://rpubs.com/echarty/data-models}{code samples}
0 commit comments