Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 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 year = new Date(data[data.length - 1][0]).getFullYear(); // Get year of last data point
16
 
17
        // Create the chart
18
        $('#container').highcharts('StockChart', {
19
 
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
                data: [{
45
                    x: Date.UTC(year, 1, 22),
46
                    title: 'A',
47
                    text: 'Shape: "squarepin"'
48
                }, {
49
                    x: Date.UTC(year, 3, 28),
50
                    title: 'A',
51
                    text: 'Shape: "squarepin"'
52
                }],
53
                onSeries: 'dataseries',
54
                shape: 'squarepin',
55
                width: 16
56
            }, {
57
                type: 'flags',
58
                data: [{
59
                    x: Date.UTC(year, 2, 1),
60
                    title: 'B',
61
                    text: 'Shape: "circlepin"'
62
                }, {
63
                    x: Date.UTC(year, 3, 1),
64
                    title: 'B',
65
                    text: 'Shape: "circlepin"'
66
                }],
67
                shape: 'circlepin',
68
                width: 16
69
            }, {
70
                type: 'flags',
71
                data: [{
72
                    x: Date.UTC(year, 2, 10),
73
                    title: 'C',
74
                    text: 'Shape: "flag"'
75
                }, {
76
                    x: Date.UTC(year, 3, 11),
77
                    title: 'C',
78
                    text: 'Shape: "flag"'
79
                }],
80
                color: Highcharts.getOptions().colors[0], // same as onSeries
81
                fillColor: Highcharts.getOptions().colors[0],
82
                onSeries: 'dataseries',
83
                width: 16,
84
                style: { // text style
85
                    color: 'white'
86
                },
87
                states: {
88
                    hover: {
89
                        fillColor: '#395C84' // darker
90
                    }
91
                }
92
            }]
93
        });
94
    });
95
});
96
		</script>
97
	</head>
98
	<body>
99
<script src="../../js/highstock.js"></script>
100
<script src="../../js/modules/exporting.js"></script>
101
 
102
 
103
<div id="container" style="height: 400px"></div>
104
	</body>
105
</html>