ec.theme | R Documentation |
Apply a pre-built or custom coded theme to a chart
ec.theme(wt, name = "custom", code = NULL)
wt |
Required |
name |
Name of existing theme file (without extension), or name of custom theme defined in |
code |
Custom theme as JSON formatted string, default NULL. |
Just a few built-in themes are included in folder inst/themes
.
Their names are dark, gray, jazz, dark-mushroom and macarons.
The entire ECharts theme collection could be found here and files copied if needed.
To create custom themes or view predefined ones, visit this site.
An echarty
widget.
mtcars |> ec.init() |> ec.theme('dark-mushroom')
cars |> ec.init() |> ec.theme('mine', code=
'{"color": ["green","#eeaa33"],
"backgroundColor": "lemonchiffon"}')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.