~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to timeline/coverage/intraday-area/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=new-intraday.json&callback=?', function(data) {
 
11
 
 
12
                // create the chart
 
13
                $('#container').highcharts('StockChart', {
 
14
                        
 
15
 
 
16
                        title: {
 
17
                                text: 'AAPL stock price by minute'
 
18
                        },
 
19
                        
 
20
                        xAxis: {
 
21
                                gapGridLineWidth: 0
 
22
                        },
 
23
                        
 
24
                        rangeSelector : {
 
25
                                buttons : [{
 
26
                                        type : 'hour',
 
27
                                        count : 1,
 
28
                                        text : '1h'
 
29
                                }, {
 
30
                                        type : 'day',
 
31
                                        count : 1,
 
32
                                        text : '1D'
 
33
                                }, {
 
34
                                        type : 'all',
 
35
                                        count : 1,
 
36
                                        text : 'All'
 
37
                                }],
 
38
                                selected : 1,
 
39
                                inputEnabled : false
 
40
                        },
 
41
                        
 
42
                        series : [{
 
43
                                name : 'AAPL',
 
44
                                type: 'area',
 
45
                                data : data,
 
46
                                gapSize: 5,
 
47
                                tooltip: {
 
48
                                        valueDecimals: 2
 
49
                                },
 
50
                                fillColor : {
 
51
                                        linearGradient : {
 
52
                                                x1: 0, 
 
53
                                                y1: 0, 
 
54
                                                x2: 0, 
 
55
                                                y2: 1
 
56
                                        },
 
57
                                        stops : [[0, Highcharts.getOptions().colors[0]], [1, 'rgba(0,0,0,0)']]
 
58
                                },
 
59
                                threshold: null
 
60
                        }]
 
61
                });
 
62
        });
 
63
});
 
64
 
 
65
                </script>
 
66
        </head>
 
67
        <body>
 
68
<div id="container" style="height: 500px; min-width: 500px"></div>
 
69
 
 
70
<script src="../../js/highstock.js"></script>
 
71
<script src="../../js/modules/exporting.js"></script>
 
72
        </body>
 
73
</html>