diff --git a/_pkgdown.yml b/_pkgdown.yml index b470265..b46c2fb 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -16,6 +16,8 @@ navbar: menu: - text: "Labs: title, subtitle & axis" href: articles/labs.html + - text: "Options & styles for lines" + href: articles/lines.html - text: News href: news/index.html right: diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index c87e8c6..d2d4af7 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -60,7 +60,7 @@
@@ -88,6 +88,9 @@apex(data = n_cut, type = "column", mapping = aes(x = cut, y = n)) %>%
ax_title(text = "Cut distribution")
You can set some options, for example:
+ +You can set some options, for example:
apex(data = n_cut, type = "column", mapping = aes(x = cut, y = n)) %>%
ax_title(
text = "Cut distribution",
align = "center",
style = list(fontSize = "22px")
)
Full list of parameters is available here : https://apexcharts.com/docs/options/title/
+ +Full list of parameters is available here : https://apexcharts.com/docs/options/title/
With same options than for title:
+ +With same options than for title:
apex(data = n_cut, type = "column", mapping = aes(x = cut, y = n)) %>%
ax_title(
text = "Cut distribution",
@@ -134,8 +137,8 @@
align = "center",
style = list(fontSize = "16px", color = "#BDBDBD")
)
Full list of parameters is available here : https://apexcharts.com/docs/options/subtitle/
+ +Full list of parameters is available here : https://apexcharts.com/docs/options/subtitle/
With some options:
+ +With some options:
- - + +library(apexcharter)
+library(dplyr)
+
+# economics dataset from ggplot2
+data("economics", package = "ggplot2")
+economics <- tail(economics, 50)
+
+data("economics_long", package = "ggplot2")
+economics_long <- economics_long %>%
+ filter(variable %in% c("pce", "pop")) %>%
+ group_by(variable) %>%
+ slice(tail(row_number(), 20))
Classic line:
+ + +Spline curve:
+apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>%
+ ax_stroke(curve = "smooth")
Steps chart:
+ + + +Color line with gradient:
+apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>%
+ ax_fill(
+ type = "gradient",
+ gradient = list(
+ shade = "dark",
+ gradientToColors = list("#FDD835"),
+ shadeIntensity = 1,
+ type = "horizontal",
+ opacityFrom = 1,
+ opacityTo = 1,
+ stops = c(0, 100, 100, 100)
+ )
+ )
Solid area color:
+apex(data = economics, type = "area", mapping = aes(x = date, y = uempmed)) %>%
+ ax_fill(type = "solid", opacity = 1)
Line width:
+apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>%
+ ax_stroke(width = 1)
Dotted line
+ + + +Add points to line :
+apex(data = tail(economics, 20), type = "line", mapping = aes(x = date, y = uempmed)) %>%
+ ax_markers(size = 6)
Add labels over points
+ + + +You can use vectors of parameters to custom series separately:
+ + + + + +