forked from jbkunst/highcharter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-ffx.R
65 lines (62 loc) · 1.46 KB
/
theme-ffx.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#' Firefox theme for highcharts
#'
#' Firefox theme was inspired by \url{https://mozilla.design/}.
#'
#' @param ... A named parameters to modify the theme.
#'
#' @examples
#'
#' highcharts_demo() %>%
#' hc_add_theme(hc_theme_ffx())
#' @export
hc_theme_ffx <- function(...) {
theme <-
hc_theme(
colors = c("#00AACC", "#FF4E00", "#B90000", "#5F9B0A", "#CD6723"),
chart = list(
backgroundColor = list(
linearGradient = list(0, 0, 0, 150),
stops = list(
list(0, "#CAE1F4"),
list(1, "#EEEEEE")
)
),
style = list(
fontFamily = "Open Sans"
)
),
title = list(
align = "left"
),
subtitle = list(
align = "left"
),
legend = list(
align = "right",
verticalAlign = "bottom"
),
xAxis = list(
gridLineWidth = 1,
gridLineColor = "#F3F3F3",
lineColor = "#F3F3F3",
minorGridLineColor = "#F3F3F3",
tickColor = "#F3F3F3",
tickWidth = 1
),
yAxis = list(
gridLineColor = "#F3F3F3",
lineColor = "#F3F3F3",
minorGridLineColor = "#F3F3F3",
tickColor = "#F3F3F3",
tickWidth = 1
)
)
theme <- structure(theme, class = "hc_theme")
if (length(list(...)) > 0) {
theme <- hc_theme_merge(
theme,
hc_theme(...)
)
}
theme
}