eMarkPoint: Create an markpoint using the ECharts(version:3.2.2) library

Description Usage Arguments Examples

View source: R/eMarkPoint.R

Description

This function creates an HTML widget to display matrix, data.frame and factor array, using the JavaScript library ECharts3.

Usage

1
2
3
4
5
eMarkPoint(chart, dat = NULL, xvar = NULL, yvar = NULL,
  series = NULL, type = NULL, valueIndex = 0, seriesIndex = NULL,
  symbol = "pin", symbolSize = 50, symbolRotate = NULL,
  symbolOffset = c(0, 0), silent = TRUE, label = NULL,
  itemStyle = NULL)

Arguments

chart

a recharts object

dat

a data object (a matrix, a data frame or a factor array)

xvar, yvar

objects of class "formula" (or one that can be coerced to that class): x,y coordinates of the given data.frame colnames, e.g. xvar = ~xAxisName; yvar = ~yAxisName. xvar, yvar only needed for the data.frame data input.

series

an "formula" object: Associates the levels of variable with symbol color, e.g. series = ~groupName

type

default is NULL,

valueIndex

default is 0,

seriesIndex

default is NULL,

symbol

default is 'pin',

symbolSize

default is 50,

symbolRotate

default is NULL,

symbolOffset

default is c(0,0),

silent

default is FALSE,

label

default is NULL,

itemStyle

default is NULL

size

an array of html widget width and height(either numeric pixels or percentage could be accepted): e.g. size = c(1024, 768).

Examples

1
2
3
4
5
dat <- cut(rnorm(1000), -4:4)
chart = eLine(dat)
eMarkPoint(chart, type=c('max','min'),valueIndex = 1)
eMarkPoint(chart, dat = data.frame(2:3,rep(200,2)),
           type=c('max','min'),valueIndex = 1)

cosname/recharts documentation built on Aug. 29, 2020, 9:47 a.m.