forked from jbkunst/highcharter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-gridlight.R
80 lines (77 loc) · 1.7 KB
/
theme-gridlight.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#' Grid Light theme for highcharts
#'
#' @param ... A named parameters to modify the theme.
#'
#' @examples
#'
#' highcharts_demo() %>%
#' hc_add_theme(hc_theme_gridlight())
#' @export
hc_theme_gridlight <- function(...) {
theme <-
list(
colors = c(
"#7CB5EC", "#F7A35C", "#90EE7E", "#7798BF",
"#AAEEEE", "#FF0066", "#EEAAEE", "#55BF3B"
),
chart = list(
backgroundColor = NULL,
style = list(
fontFamily = "Dosis, sans-serif"
)
),
title = list(
style = list(
fontSize = "16px",
fontWeight = "bold",
textTransform = "uppercase"
)
),
tooltip = list(
borderWidth = 0,
backgroundColor = "rgba(219,219,216,0.8)",
shadow = FALSE
),
legend = list(
itemStyle = list(
fontWeight = "bold",
fontSize = "13px"
)
),
xAxis = list(
gridLineWidth = 1,
labels = list(
style = list(
fontSize = "12px"
)
)
),
yAxis = list(
minorTickInterval = "auto",
title = list(
style = list(
textTransform = "uppercase"
)
),
labels = list(
style = list(
fontSize = "12px"
)
)
),
plotOptions = list(
candlestick = list(
lineColor = "#404048"
)
),
background2 = "#F0F0EA"
)
theme <- structure(theme, class = "hc_theme")
if (length(list(...)) > 0) {
theme <- hc_theme_merge(
theme,
hc_theme(...)
)
}
theme
}