Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
/**
2
 * Dark theme for Highcharts JS
3
 * @author Torstein Honsi
4
 */
5
 
6
// Load the fonts
7
Highcharts.createElement('link', {
8
	href: '//fonts.googleapis.com/css?family=Unica+One',
9
	rel: 'stylesheet',
10
	type: 'text/css'
11
}, null, document.getElementsByTagName('head')[0]);
12
 
13
Highcharts.theme = {
14
	colors: ["#2b908f", "#90ee7e", "#f45b5b", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
15
		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
16
	chart: {
17
		backgroundColor: {
18
			linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
19
			stops: [
20
				[0, '#2a2a2b'],
21
				[1, '#3e3e40']
22
			]
23
		},
24
		style: {
25
			fontFamily: "'Unica One', sans-serif"
26
		},
27
		plotBorderColor: '#606063'
28
	},
29
	title: {
30
		style: {
31
			color: '#E0E0E3',
32
			textTransform: 'uppercase',
33
			fontSize: '20px'
34
		}
35
	},
36
	subtitle: {
37
		style: {
38
			color: '#E0E0E3',
39
			textTransform: 'uppercase'
40
		}
41
	},
42
	xAxis: {
43
		gridLineColor: '#707073',
44
		labels: {
45
			style: {
46
				color: '#E0E0E3'
47
			}
48
		},
49
		lineColor: '#707073',
50
		minorGridLineColor: '#505053',
51
		tickColor: '#707073',
52
		title: {
53
			style: {
54
				color: '#A0A0A3'
55
 
56
			}
57
		}
58
	},
59
	yAxis: {
60
		gridLineColor: '#707073',
61
		labels: {
62
			style: {
63
				color: '#E0E0E3'
64
			}
65
		},
66
		lineColor: '#707073',
67
		minorGridLineColor: '#505053',
68
		tickColor: '#707073',
69
		tickWidth: 1,
70
		title: {
71
			style: {
72
				color: '#A0A0A3'
73
			}
74
		}
75
	},
76
	tooltip: {
77
		backgroundColor: 'rgba(0, 0, 0, 0.85)',
78
		style: {
79
			color: '#F0F0F0'
80
		}
81
	},
82
	plotOptions: {
83
		series: {
84
			dataLabels: {
85
				color: '#B0B0B3'
86
			},
87
			marker: {
88
				lineColor: '#333'
89
			}
90
		},
91
		boxplot: {
92
			fillColor: '#505053'
93
		},
94
		candlestick: {
95
			lineColor: 'white'
96
		},
97
		errorbar: {
98
			color: 'white'
99
		}
100
	},
101
	legend: {
102
		itemStyle: {
103
			color: '#E0E0E3'
104
		},
105
		itemHoverStyle: {
106
			color: '#FFF'
107
		},
108
		itemHiddenStyle: {
109
			color: '#606063'
110
		}
111
	},
112
	credits: {
113
		style: {
114
			color: '#666'
115
		}
116
	},
117
	labels: {
118
		style: {
119
			color: '#707073'
120
		}
121
	},
122
 
123
	drilldown: {
124
		activeAxisLabelStyle: {
125
			color: '#F0F0F3'
126
		},
127
		activeDataLabelStyle: {
128
			color: '#F0F0F3'
129
		}
130
	},
131
 
132
	navigation: {
133
		buttonOptions: {
134
			symbolStroke: '#DDDDDD',
135
			theme: {
136
				fill: '#505053'
137
			}
138
		}
139
	},
140
 
141
	// scroll charts
142
	rangeSelector: {
143
		buttonTheme: {
144
			fill: '#505053',
145
			stroke: '#000000',
146
			style: {
147
				color: '#CCC'
148
			},
149
			states: {
150
				hover: {
151
					fill: '#707073',
152
					stroke: '#000000',
153
					style: {
154
						color: 'white'
155
					}
156
				},
157
				select: {
158
					fill: '#000003',
159
					stroke: '#000000',
160
					style: {
161
						color: 'white'
162
					}
163
				}
164
			}
165
		},
166
		inputBoxBorderColor: '#505053',
167
		inputStyle: {
168
			backgroundColor: '#333',
169
			color: 'silver'
170
		},
171
		labelStyle: {
172
			color: 'silver'
173
		}
174
	},
175
 
176
	navigator: {
177
		handles: {
178
			backgroundColor: '#666',
179
			borderColor: '#AAA'
180
		},
181
		outlineColor: '#CCC',
182
		maskFill: 'rgba(255,255,255,0.1)',
183
		series: {
184
			color: '#7798BF',
185
			lineColor: '#A6C7ED'
186
		},
187
		xAxis: {
188
			gridLineColor: '#505053'
189
		}
190
	},
191
 
192
	scrollbar: {
193
		barBackgroundColor: '#808083',
194
		barBorderColor: '#808083',
195
		buttonArrowColor: '#CCC',
196
		buttonBackgroundColor: '#606063',
197
		buttonBorderColor: '#606063',
198
		rifleColor: '#FFF',
199
		trackBackgroundColor: '#404043',
200
		trackBorderColor: '#404043'
201
	},
202
 
203
	// special colors for some of the
204
	legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
205
	background2: '#505053',
206
	dataLabelsColor: '#B0B0B3',
207
	textColor: '#C0C0C0',
208
	contrastTextColor: '#F0F0F3',
209
	maskColor: 'rgba(255,255,255,0.3)'
210
};
211
 
212
// Apply the theme
213
Highcharts.setOptions(Highcharts.theme);