ec.fromJson: JSON to chart

View source: R/util.R

ec.fromJsonR Documentation

JSON to chart

Description

Convert JSON string or file to chart

Usage

ec.fromJson(txt, ...)

Arguments

txt

Could be one of the following:
⁠ ⁠class url, like url('https://serv.us/cars.txt')
⁠ ⁠class file, like file('c:/temp/cars.txt','rb')
⁠ ⁠class json, like ec.inspect(p), for options or full
⁠ ⁠class character, JSON string with options only, see example below

...

Any attributes to pass to internal ec.init when txt is options only

Details

txt could be either a list of options (x$opts) to be set by setOption,
OR an entire htmlwidget generated thru ec.inspect when target='full'.
The latter imports all JavaScript functions defined by the user.

Value

An echarty widget.

Examples

txt <- '{
   "xAxis": { "data": ["Mon", "Tue", "Wed"]}, "yAxis": { },
   "series": { "type": "line", "data": [150, 230, 224] } }'
ec.fromJson(txt)

# ec.fromJson('https://helgasoft.github.io/echarty/test/pfull.json')

echarty documentation built on Oct. 16, 2023, 1:06 a.m.