forked from jbkunst/highcharter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-ft.R
126 lines (118 loc) · 2.51 KB
/
theme-ft.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#' Financial Times theme for highcharts
#'
#' Financial Times theme for highcharts
#'
#' @param ... Named argument to modify the theme
#'
#' @examples
#'
#' hc_demo() %>%
#' hc_add_theme(hc_theme_ft())
#'
#' @export
hc_theme_ft <- function(...){
theme <-
list(
colors = c("#89736C",
"#43423e",
"#2e6e9e",
"#FF0000",
"#BEDDDE"),
chart = list(
backgroundColor = "#FFF1E0",
style = list(
fontFamily = "Droid Sans",
color = '#777'
)
),
title = list(
align = "left",
style = list(
fontFamily = "Droid Serif",
color = "black",
fontWeight = "bold"
)
),
subtitle = list(
align = "left",
style = list(
fontFamily = "Droid Serif",
fontWeight = "bold"
)
),
yAxis = list(
gridLineDashStyle = "Dot",
gridLineColor = '#CEC6B9',
lineColor = '#CEC6B9',
minorGridLineColor = '#CEC6B9',
labels = list(
align = "left",
x = 0,
y = -2
),
tickLength = 0,
tickColor = '#CEC6B9',
tickWidth = 1,
title = list(
style = list(
color = '#74736c'
)
)
),
tooltip = list(
backgroundColor = "#FFFFFF",
borderColor = "#76c0c1",
style = list(
color = "#000000"
)
),
legend = list(
itemStyle = list(
color = '#3C3C3C'
),
itemHiddenStyle = list(
color = '#606063'
)
),
credits = list(
style = list(
color = '#666'
)
),
labels = list(
style = list(
color = '#D7D7D8'
)
),
drilldown = list(
activeAxisLabelStyle = list(
color = '#F0F0F3'
),
activeDataLabelStyle = list(
color = '#F0F0F3'
)
),
navigation = list(
buttonOptions = list(
symbolStroke = '#DDDDDD',
theme = list(
fill = '#505053'
)
)
),
legendBackgroundColor = 'rgba(0, 0, 0, 0.5)',
background2 = '#505053',
dataLabelsColor = '#B0B0B3',
textColor = '#C0C0C0',
contrastTextColor = '#F0F0F3',
maskColor = 'rgba(255,255,255,0.3)'
)
theme <- structure(theme, class = "hc_theme")
if (length(list(...)) > 0) {
theme <- hc_theme_merge(
theme,
hc_theme(...)
)
}
theme
}