relocWidget: Re-locate Echarts Widgets (Position of Upper-left/Lower-right...

Description Usage Arguments Value Note See Also Examples

View source: R/coordsys.R

Description

Re-locate Echarts Widgets (Position of Upper-left/Lower-right Point)

Usage

1
relocWidget(chart, widgets, x = NULL, y = NULL, x2 = NULL, y2 = NULL)

Arguments

chart

Echarts object

widgets

Vector or list, could be 'title', 'timeline', 'legend', 'toolbox', 'dataRange', 'dataZoom'

x

Vector, x-coordinates of the widgets' upper-left point

y

Vector, y-coordinates of the widgets' upper-left point

x2

Vector, x-coordinates of the widgets' lower-right point

y2

Vector, y-coordinates of the widgets' lower-right point

Value

A modified Echarts object

Note

If x, y, x2, y2 are shorter in length than the list widgets, the last element of x, y, x2, y2 will be applied to cover the rest. If x, y, x2, y2 are longer in length than the list widgets, the redundent elements will be dropped.

See Also

setGrid

Examples

1
2
3
4
5
## Not run: 
g = echartR(iris, Sepal.Width, Petal.Width) %>% setDataZoom()
g %>% relocWidgets('dataZoom', x=150)

## End(Not run)

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