Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 1
<!DOCTYPE HTML>
2
<html>
3
	<head>
4
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
		<title>Highcharts Example</title>
6
 
7
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
8
		<style type="text/css">
9
${demo.css}
10
		</style>
11
		<script type="text/javascript">
12
$(function () {
13
    $('#container').highcharts({
14
        chart: {
15
            zoomType: 'xy'
16
        },
17
        title: {
18
            text: 'Average Monthly Weather Data for Tokyo'
19
        },
20
        subtitle: {
21
            text: 'Source: WorldClimate.com'
22
        },
23
        xAxis: [{
24
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
25
                'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
26
            crosshair: true
27
        }],
28
        yAxis: [{ // Primary yAxis
29
            labels: {
30
                format: '{value}°C',
31
                style: {
32
                    color: Highcharts.getOptions().colors[2]
33
                }
34
            },
35
            title: {
36
                text: 'Temperature',
37
                style: {
38
                    color: Highcharts.getOptions().colors[2]
39
                }
40
            },
41
            opposite: true
42
 
43
        }, { // Secondary yAxis
44
            gridLineWidth: 0,
45
            title: {
46
                text: 'Rainfall',
47
                style: {
48
                    color: Highcharts.getOptions().colors[0]
49
                }
50
            },
51
            labels: {
52
                format: '{value} mm',
53
                style: {
54
                    color: Highcharts.getOptions().colors[0]
55
                }
56
            }
57
 
58
        }, { // Tertiary yAxis
59
            gridLineWidth: 0,
60
            title: {
61
                text: 'Sea-Level Pressure',
62
                style: {
63
                    color: Highcharts.getOptions().colors[1]
64
                }
65
            },
66
            labels: {
67
                format: '{value} mb',
68
                style: {
69
                    color: Highcharts.getOptions().colors[1]
70
                }
71
            },
72
            opposite: true
73
        }],
74
        tooltip: {
75
            shared: true
76
        },
77
        legend: {
78
            layout: 'vertical',
79
            align: 'left',
80
            x: 80,
81
            verticalAlign: 'top',
82
            y: 55,
83
            floating: true,
84
            backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
85
        },
86
        series: [{
87
            name: 'Rainfall',
88
            type: 'column',
89
            yAxis: 1,
90
            data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
91
            tooltip: {
92
                valueSuffix: ' mm'
93
            }
94
 
95
        }, {
96
            name: 'Sea-Level Pressure',
97
            type: 'spline',
98
            yAxis: 2,
99
            data: [1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7],
100
            marker: {
101
                enabled: false
102
            },
103
            dashStyle: 'shortdot',
104
            tooltip: {
105
                valueSuffix: ' mb'
106
            }
107
 
108
        }, {
109
            name: 'Temperature',
110
            type: 'spline',
111
            data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
112
            tooltip: {
113
                valueSuffix: ' °C'
114
            }
115
        }]
116
    });
117
});
118
 
119
 
120
		</script>
121
	</head>
122
	<body>
123
<script src="../../js/highcharts.js"></script>
124
<script src="../../js/modules/exporting.js"></script>
125
 
126
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
127
 
128
	</body>
129
</html>