Skip to content

Commit 96c33a0

Browse files
committed
fix: rendered fixes #415
1 parent 88285be commit 96c33a0

File tree

6 files changed

+22
-58
lines changed

6 files changed

+22
-58
lines changed

R/facets.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#' "temperature" = runif(group_size * n_groups, 10, 40),
1515
#' "location" = rep(LETTERS[1:n_groups], each=group_size))
1616
#'
17-
#' df %>%
18-
#' group_by(location) %>%
19-
#' e_charts(day) %>%
20-
#' e_line(temperature) %>%
17+
#' df |>
18+
#' group_by(location) |>
19+
#' e_charts(day) |>
20+
#' e_line(temperature) |>
2121
#' e_facet(rows = 4, cols=4, legend_pos = "top", legend_space = 12)
2222
#'
2323
#' @details Each serie, i.e.: \code{\link{e_bar}} will be plotted against a facet.

R/themes.R

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -32,49 +32,14 @@
3232
#' @export
3333
e_theme <- function(
3434
e,
35-
name = c(
36-
"auritus",
37-
"azul",
38-
"bee-inspired",
39-
"blue",
40-
"caravan",
41-
"carp",
42-
"chalk",
43-
"cool",
44-
"dark-blue",
45-
"dark-bold",
46-
"dark-digerati",
47-
"dark-fresh-cut",
48-
"dark-mushroom",
49-
"dark",
50-
"eduardo",
51-
"essos",
52-
"forest",
53-
"fresh-cut",
54-
"fruit",
55-
"gray",
56-
"green",
57-
"halloween",
58-
"helianthus",
59-
"infographic",
60-
"inspired",
61-
"jazz",
62-
"london",
63-
"macarons",
64-
"macarons2",
65-
"mint",
66-
"purple-passion",
67-
"red-velvet",
68-
"red",
69-
"roma",
70-
"royal",
71-
"sakura",
72-
"shine",
73-
"tech-blue",
74-
"vintage",
75-
"walden",
76-
"westeros",
77-
"wonderland"
35+
name = c("auritus", "azul", "bee-inspired", "blue", "caravan", "carp",
36+
"chalk", "cool", "dark-blue", "dark-bold", "dark-digerati", "dark-fresh-cut",
37+
"dark-mushroom", "dark", "eduardo", "essos", "forest", "fresh-cut",
38+
"fruit", "gray", "green", "halloween", "helianthus", "infographic",
39+
"inspired", "jazz", "london", "macarons", "macarons2", "mint",
40+
"purple-passion", "red-velvet", "red", "roma", "royal", "sakura",
41+
"shine", "tech-blue", "vintage", "walden", "wef", "weforum",
42+
"westeros", "wonderland"
7843
)
7944
) {
8045
name <- match.arg(name)

inst/htmlwidgets/echarts4r.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ HTMLWidgets.widget({
5656
mapboxgl.accessToken = x.mapboxToken;
5757
}
5858

59+
if(!x.mainOpts)
60+
x.mainOpts = [];
61+
x.mainOpts.renderer = x.renderer;
62+
5963
chart = echarts.init(document.getElementById(el.id), x.theme, x.mainOpts);
6064

6165
opts = evalFun(x.opts);

man/e_facet.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/theme.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/themes.Rmd

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,6 @@ p |> e_theme("halloween")
124124
p |> e_theme("azul")
125125
```
126126

127-
## bee-insipired
128-
129-
```{r}
130-
p |> e_theme("bee-insipired")
131-
```
132-
133127
## blue
134128

135129
```{r}

0 commit comments

Comments
 (0)