Learn R Programming

echarty (version 1.4.7)

ec.fromJson: JSON to chart

Description

Convert JSON string to chart

Usage

ec.fromJson(txt, ...)

Value

An echarty widget.

Arguments

txt

JSON character string, url, or file, see fromJSON

...

Any arguments to pass to internal ec.init

Details

txt should contain the full list of options required to build a chart. It is subsequently passed to ECharts function setOption.

Examples

Run this code
txt <- '{
  "xAxis": { "type": "category",
     "data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
   },
   "yAxis": { "type": "value" },
   "series": { "type": "line",
     "data": [150, 230, 224, 218, 135, 147, 260]
   } }'
ec.fromJson(txt)

Run the code above in your browser using DataLab