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>Highstock 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
 
14
    $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=large-dataset.json&callback=?', function (data) {
15
 
16
        // Create a timer
17
        var start = +new Date();
18
 
19
        // Create the chart
20
        $('#container').highcharts('StockChart', {
21
            chart: {
22
                events: {
23
                    load: function () {
24
                        if (!window.isComparing) {
25
                            this.setTitle(null, {
26
                                text: 'Built chart in ' + (new Date() - start) + 'ms'
27
                            });
28
                        }
29
                    }
30
                },
31
                zoomType: 'x'
32
            },
33
 
34
            rangeSelector: {
35
 
36
                buttons: [{
37
                    type: 'day',
38
                    count: 3,
39
                    text: '3d'
40
                }, {
41
                    type: 'week',
42
                    count: 1,
43
                    text: '1w'
44
                }, {
45
                    type: 'month',
46
                    count: 1,
47
                    text: '1m'
48
                }, {
49
                    type: 'month',
50
                    count: 6,
51
                    text: '6m'
52
                }, {
53
                    type: 'year',
54
                    count: 1,
55
                    text: '1y'
56
                }, {
57
                    type: 'all',
58
                    text: 'All'
59
                }],
60
                selected: 3
61
            },
62
 
63
            yAxis: {
64
                title: {
65
                    text: 'Temperature (°C)'
66
                }
67
            },
68
 
69
            title: {
70
                text: 'Hourly temperatures in Vik i Sogn, Norway, 2009-2015'
71
            },
72
 
73
            subtitle: {
74
                text: 'Built chart in ...' // dummy text to reserve space for dynamic subtitle
75
            },
76
 
77
            series: [{
78
                name: 'Temperature',
79
                data: data.data,
80
                pointStart: data.pointStart,
81
                pointInterval: data.pointInterval,
82
                tooltip: {
83
                    valueDecimals: 1,
84
                    valueSuffix: '°C'
85
                }
86
            }]
87
 
88
        });
89
    });
90
});
91
		</script>
92
	</head>
93
	<body>
94
<script src="../../js/highstock.js"></script>
95
<script src="../../js/modules/exporting.js"></script>
96
 
97
<div id="container" style="height: 400px; min-width: 310px"></div>
98
	</body>
99
</html>