ec.inspect | R Documentation |
Convert chart to JSON string
ec.inspect(wt, target = "opts", ...)
wt |
An |
target |
type of resulting value: |
... |
Additional attributes to pass to toJSON |
Must be invoked or chained as last command.
target='full' will export all JavaScript custom code, ready to be used on import.
See also ec.fromJson.
A JSON string, except when target
is 'data' - then
a character vector.
# extract JSON
json <- cars |> ec.init() |> ec.inspect()
json
# get from JSON and modify plot
ec.fromJson(json) |> ec.theme('macarons')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.