Project

General

Profile

1
/**
2
 * Sand-Signika theme for Highcharts JS
3
 * @author Torstein Honsi
4
 */
5

    
6
// Load the fonts
7
Highcharts.createElement('link', {
8
	href: 'http://fonts.googleapis.com/css?family=Signika:400,700',
9
	rel: 'stylesheet',
10
	type: 'text/css'
11
}, null, document.getElementsByTagName('head')[0]);
12

    
13
// Add the background image to the container
14
Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function (proceed) {
15
	proceed.call(this);
16
	this.container.style.background = 'url(http://www.highcharts.com/samples/graphics/sand.png)';
17
});
18

    
19

    
20
Highcharts.theme = {
21
	colors: ["#f45b5b", "#8085e9", "#8d4654", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
22
		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
23
	chart: {
24
		backgroundColor: null,
25
		style: {
26
			fontFamily: "Signika, serif"
27
		}
28
	},
29
	title: {
30
		style: {
31
			color: 'black',
32
			fontSize: '16px',
33
			fontWeight: 'bold'
34
		}
35
	},
36
	subtitle: {
37
		style: {
38
			color: 'black'
39
		}
40
	},
41
	tooltip: {
42
		borderWidth: 0
43
	},
44
	legend: {
45
		itemStyle: {
46
			fontWeight: 'bold',
47
			fontSize: '13px'
48
		}
49
	},
50
	xAxis: {
51
		labels: {
52
			style: {
53
				color: '#6e6e70'
54
			}
55
		}
56
	},
57
	yAxis: {
58
		labels: {
59
			style: {
60
				color: '#6e6e70'
61
			}
62
		}
63
	},
64
	plotOptions: {
65
		series: {
66
			shadow: true
67
		},
68
		candlestick: {
69
			lineColor: '#404048'
70
		}
71
	},
72

    
73
	// Highstock specific
74
	navigator: {
75
		xAxis: {
76
			gridLineColor: '#D0D0D8'
77
		}
78
	},
79
	rangeSelector: {
80
		buttonTheme: {
81
			fill: 'white',
82
			stroke: '#C0C0C8',
83
			'stroke-width': 1,
84
			states: {
85
				select: {
86
					fill: '#D0D0D8'
87
				}
88
			}
89
		}
90
	},
91
	scrollbar: {
92
		trackBorderColor: '#C0C0C8'
93
	},
94

    
95
	// General
96
	background2: '#E0E0E8'
97
	
98
};
99

    
100
// Apply the theme
101
Highcharts.setOptions(Highcharts.theme);
(7-7/8)