ec.upd {echarty}R Documentation

Update option lists

Description

And improve readability by chaining commands after ec.init

Usage

ec.upd(wt, ...)

Arguments

wt

An echarty widget

...

R commands to update chart option lists

Details

ec.upd makes changes to chart elements already set by ec.init.
It should be always piped after ec.init.
All numerical indexes for series,visualMap,etc. are JS-counted (start at 0)
Replaces syntax
⁠ ⁠p <- ec.init(...)
⁠ ⁠p$x$opts$series <- ...
with
⁠ ⁠ec.init(...) |> ⁠ ⁠ # set or preset chart params
⁠ ⁠ec.upd({series <- ...}) # update params thru R commands

Examples

Orange |> dplyr::group_by(Tree) |> 
ec.init(series.param= list(universalTransition= list(enabled=TRUE))) |>
ec.upd({ 
 series <- lapply(series, function(ss) { ss$groupId <- ss$name; ss })
})

[Package echarty version 1.6.3 Index]