Last active
April 16, 2025 06:22
-
-
Save helgasoft/e914fe6f4a9ed9407f78e41cb18b3aaa to your computer and use it in GitHub Desktop.
echarty announcements and temporary notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' This gist is for echarty announcements and notes | |
#' Comments are temporary, periodically deleted. | |
#' If you like echarty, please consider granting a Github star β. | |
library(echarty) | |
data.frame(x = seq.int(1, 5, 1), | |
y = seq.int(1, 10, 2)) |> | |
ec.init( | |
series.param= list( | |
type='line', symbolSize= 10, | |
lineStyle = list(opacity= 0.7), | |
itemStyle = list(opacity= 1), | |
areaStyle= list(color= 'red', opacity= 0.5)) | |
) |
@gacolitti, your toolbox JS example is correct.
as long as the toolbox is enabled in the chart options, the theme should be able to configure many of the options related to the toolbox.
Here is precisely that, done with echarty.
# json <- '{"color": ["green"], "backgroundColor": "lemonchiffon"}'
json <- '{
"toolbox": { "feature": {
"dataZoom": { "yAxisIndex": "none" },
"restore": {}
} }
}'
cars |> ec.init(toolbox= list(show=T)) |> ec.theme(name='bmine', code=json)
π If you like echarty, please consider granting a Github star β
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
echarty is on WebR - see the Coder.
Live R-code execution inside a single web page. No Rmd. No server. No installation. Wow!
Thanks to: @seanbirchall for the idea and @timelyportfolio for the solution ππ