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 Temperature and Rainfall in 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[1]
33
                }
34
            },
35
            title: {
36
                text: 'Temperature',
37
                style: {
38
                    color: Highcharts.getOptions().colors[1]
39
                }
40
            }
41
        }, { // Secondary yAxis
42
            title: {
43
                text: 'Rainfall',
44
                style: {
45
                    color: Highcharts.getOptions().colors[0]
46
                }
47
            },
48
            labels: {
49
                format: '{value} mm',
50
                style: {
51
                    color: Highcharts.getOptions().colors[0]
52
                }
53
            },
54
            opposite: true
55
        }],
56
        tooltip: {
57
            shared: true
58
        },
59
        legend: {
60
            layout: 'vertical',
61
            align: 'left',
62
            x: 120,
63
            verticalAlign: 'top',
64
            y: 100,
65
            floating: true,
66
            backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
67
        },
68
        series: [{
69
            name: 'Rainfall',
70
            type: 'column',
71
            yAxis: 1,
72
            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],
73
            tooltip: {
74
                valueSuffix: ' mm'
75
            }
76
 
77
        }, {
78
            name: 'Temperature',
79
            type: 'spline',
80
            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],
81
            tooltip: {
82
                valueSuffix: '°C'
83
            }
84
        }]
85
    });
86
});
87
		</script>
88
	</head>
89
	<body>
90
<script src="../../js/highcharts.js"></script>
91
<script src="../../js/modules/exporting.js"></script>
92
 
93
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
94
 
95
	</body>
96
</html>