~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to timeline/examples/yaxis-plotlines/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
                        yAxis : {
 
25
                                title : {
 
26
                                        text : 'Exchange rate'
 
27
                                },
 
28
                                plotLines : [{
 
29
                                        value : 0.6738,
 
30
                                        color : 'green',
 
31
                                        dashStyle : 'shortdash',
 
32
                                        width : 2,
 
33
                                        label : {
 
34
                                                text : 'Last quarter minimum'
 
35
                                        }
 
36
                                }, {
 
37
                                        value : 0.7419,
 
38
                                        color : 'red',
 
39
                                        dashStyle : 'shortdash',
 
40
                                        width : 2,
 
41
                                        label : {
 
42
                                                text : 'Last quarter maximum'
 
43
                                        }
 
44
                                }]
 
45
                        },
 
46
 
 
47
                        series : [{
 
48
                                name : 'USD to EUR',
 
49
                                data : data,
 
50
                                tooltip : {
 
51
                                        valueDecimals : 4
 
52
                                }
 
53
                        }]
 
54
                });
 
55
        });
 
56
});
 
57
 
 
58
                </script>
 
59
        </head>
 
60
        <body>
 
61
<script src="../../js/highstock.js"></script>
 
62
<script src="../../js/modules/exporting.js"></script>
 
63
 
 
64
<div id="container" style="height: 500px; min-width: 500px"></div>
 
65
        </body>
 
66
</html>