/
theme-hcrt.R
112 lines (107 loc) · 2.37 KB
/
theme-hcrt.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#' Highcharter theme for highcharts
#'
#' hcrt theme is used for the documentation website.
#'
#' @param ... A named parameters to modify the theme.
#'
#' @examples
#'
#' highcharts_demo() %>%
#' hc_add_theme(hc_theme_hcrt())
#' @export
hc_theme_hcrt <- function(...) {
theme <-
hc_theme(
colors = c(
"#47475c", # main purple
"#61BC7B", # green
"#508CC8", # blue
"#F49952", # orange
"#9C9EDB", # purple
"#6699a1" # gray green
),
chart = list(
style = list(
fontFamily = "IBM Plex Sans",
color = "#666666"
)
),
title = list(
align = "left",
style = list(
fontFamily = "Alegreya Sans SC",
fontSize = "24px"
)
),
subtitle = list(
align = "left",
style = list(
fontFamily = "Alegreya Sans",
fontSize = "16px"
)
),
caption = list(
style = list(
fontFamily = "Alegreya Sans",
fontSize = "14px"
)
),
credits = list(
style = list(
fontFamily = "Roboto",
fontSize = "10px"
)
),
legend = list(
align = "right",
verticalAlign = "bottom",
itemStyle = list(
fontWeight = "normal",
color = "#A2A39C"
)
),
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
),
plotOptions = list(
line = list(
marker = list(enabled = FALSE)
),
spline = list(
marker = list(enabled = FALSE)
),
area = list(
marker = list(enabled = FALSE)
),
areaspline = list(
marker = list(enabled = FALSE)
),
arearange = list(
marker = list(enabled = FALSE)
),
bubble = list(
maxSize = "10%"
)
)
)
theme <- structure(theme, class = "hc_theme")
if (length(list(...)) > 0) {
theme <- hc_theme_merge(
theme,
hc_theme(...)
)
}
theme
}