Skip to content

Instantly share code, notes, and snippets.

@helgasoft
Last active May 3, 2024 20:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helgasoft/e914fe6f4a9ed9407f78e41cb18b3aaa to your computer and use it in GitHub Desktop.
Save helgasoft/e914fe6f4a9ed9407f78e41cb18b3aaa to your computer and use it in GitHub Desktop.
echarty announcements and temporary notes
#' 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))
)
@helgasoft
Copy link
Author

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 💐👑

@helgasoft
Copy link
Author

@bluefoxr - scale scatter points by group

library(echarty)
bubble_size <- x <- y <- 1:5
df1 <- data.frame(
  x = c(x, x + 6),
  y = c(y, y + 6),
  Size = c(bubble_size*2, bubble_size*10),
  Group = c(rep("SMALL", 5), rep("BIG", 5))
)
df1 |> group_by(Group) |> 
ec.init( series.param= list(symbolSize= ec.clmn('Size')) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment