Learn R Programming

echarty (version 1.4.7)

ec.inspect: Chart to JSON

Description

Convert chart to JSON string

Usage

ec.inspect(wt, target = NULL, json = TRUE, ...)

Value

A JSON string if json is TRUE and a list otherwise.

Arguments

wt

An echarty widget as returned by ec.init

target

NULL(default) or 'data' to show info about chart's embedded data.

json

Boolean whether to return a JSON, or a list, default TRUE

...

Additional arguments to pass to toJSON

Details

Must be invoked or chained as last command.

Examples

Run this code
# extract JSON
json <- cars |> ec.init() |> ec.inspect()
json

# get from JSON and modify plot
ec.fromJson(json) |> ec.theme('macarons')

Run the code above in your browser using DataLab