ec.upd: Update option lists

ec.updR 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. 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() |>
ec.upd({ 
  series <- lapply(series, function(x) {
    x$symbolSize= 10; x$encode= list(x='age', y='circumference'); x } )
})

echarty documentation built on Nov. 24, 2022, 5:06 p.m.

Related to ec.upd in echarty...