~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to timeline/Highstock-1.3.10/examples/flags-general/index.htm

  • Committer: Jeff Stys
  • Date: 2014-04-21 12:46:26 UTC
  • Revision ID: jstys@sesda3.com-20140421124626-2332pb2dyjc33jxi
Proof-of-concept version of Data Coverage Timeline using Highchart/Highstock javascript library.  Changes to getDataCoverage API in order to feed the necessary data to the Timeline

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
                <script type="text/javascript">
 
9
$(function() {
 
10
        $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function(data) {
 
11
 
 
12
                // Create the chart
 
13
                $('#container').highcharts('StockChart', {
 
14
                        
 
15
 
 
16
                        rangeSelector : {
 
17
                                selected : 1
 
18
                        },
 
19
 
 
20
                        title : {
 
21
                                text : 'USD to EUR exchange rate'
 
22
                        },
 
23
                        
 
24
                        tooltip: {
 
25
                                style: {
 
26
                                        width: '200px'
 
27
                                },
 
28
                                valueDecimals: 4
 
29
                        },
 
30
                        
 
31
                        yAxis : {
 
32
                                title : {
 
33
                                        text : 'Exchange rate'
 
34
                                }
 
35
                        },
 
36
 
 
37
                        series : [{
 
38
                                name : 'USD to EUR',
 
39
                                data : data,
 
40
                                id : 'dataseries'
 
41
                        },
 
42
                        // the event marker flags
 
43
                        {
 
44
                                type : 'flags',
 
45
                                data : [{
 
46
                                        x : Date.UTC(2011, 3, 25),
 
47
                                        title : 'H',
 
48
                                        text : 'Euro Contained by Channel Resistance'
 
49
                                }, {
 
50
                                        x : Date.UTC(2011, 3, 28),
 
51
                                        title : 'G',
 
52
                                        text : 'EURUSD: Bulls Clear Path to 1.50 Figure'
 
53
                                }, {
 
54
                                        x : Date.UTC(2011, 4, 4),
 
55
                                        title : 'F',
 
56
                                        text : 'EURUSD: Rate Decision to End Standstill'
 
57
                                }, {
 
58
                                        x : Date.UTC(2011, 4, 5),
 
59
                                        title : 'E',
 
60
                                        text : 'EURUSD: Enter Short on Channel Break'
 
61
                                }, {
 
62
                                        x : Date.UTC(2011, 4, 6),
 
63
                                        title : 'D',
 
64
                                        text : 'Forex: U.S. Non-Farm Payrolls Expand 244K, U.S. Dollar Rally Cut Short By Risk Appetite'
 
65
                                }, {
 
66
                                        x : Date.UTC(2011, 4, 6),
 
67
                                        title : 'C',
 
68
                                        text : 'US Dollar: Is This the Long-Awaited Recovery or a Temporary Bounce?'
 
69
                                }, {
 
70
                                        x : Date.UTC(2011, 4, 9),
 
71
                                        title : 'B',
 
72
                                        text : 'EURUSD: Bearish Trend Change on Tap?'
 
73
                                }],
 
74
                                onSeries : 'dataseries',
 
75
                                shape : 'circlepin',
 
76
                                width : 16
 
77
                        }]
 
78
                });
 
79
        });
 
80
});
 
81
 
 
82
                </script>
 
83
        </head>
 
84
        <body>
 
85
<script src="../../js/highstock.js"></script>
 
86
<script src="../../js/modules/exporting.js"></script>
 
87
 
 
88
<div id="container" style="height: 500px; min-width: 500px"></div>
 
89
        </body>
 
90
</html>