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
    $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function (data) {
14
 
15
        var lastDate = data[data.length - 1][0],  // Get year of last data point
16
            days = 24 * 36e5; // Milliseconds in a day
17
 
18
        // Create the chart
19
        $('#container').highcharts('StockChart', {
20
 
21
            rangeSelector: {
22
                selected: 1
23
            },
24
 
25
            title: {
26
                text: 'USD to EUR exchange rate'
27
            },
28
 
29
            yAxis: {
30
                title: {
31
                    text: 'Exchange rate'
32
                }
33
            },
34
 
35
            series: [{
36
                name: 'USD to EUR',
37
                data: data,
38
                id: 'dataseries',
39
                tooltip: {
40
                    valueDecimals: 4
41
                }
42
            }, {
43
                type: 'flags',
44
                name: 'Flags on series',
45
                data: [{
46
                    x: lastDate - 60 * days,
47
                    title: 'On series'
48
                }, {
49
                    x: lastDate - 30 * days,
50
                    title: 'On series'
51
                }],
52
                onSeries: 'dataseries',
53
                shape: 'squarepin'
54
            }, {
55
                type: 'flags',
56
                name: 'Flags on axis',
57
                data: [{
58
                    x: lastDate - 45 * days,
59
                    title: 'On axis'
60
                }, {
61
                    x: lastDate - 15 * days,
62
                    title: 'On axis'
63
                }],
64
                shape: 'squarepin'
65
            }]
66
        });
67
    });
68
});
69
		</script>
70
	</head>
71
	<body>
72
<script src="../../js/highstock.js"></script>
73
<script src="../../js/modules/exporting.js"></script>
74
 
75
 
76
<div id="container" style="height: 400px; min-width: 310px"></div>
77
	</body>
78
</html>