~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to timeline/Highstock-1.3.10/examples/yaxis-reversed/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=aapl-c.json&callback=?', function(data) {
 
11
                
 
12
                // Create the chart
 
13
                $('#container').highcharts('StockChart', {
 
14
                    chart: {
 
15
                        type: 'area'
 
16
                    },
 
17
 
 
18
                    rangeSelector: {
 
19
                        selected: 1
 
20
                    },
 
21
 
 
22
                    title: {
 
23
                        text: 'AAPL Stock Price'
 
24
                    },
 
25
 
 
26
                    yAxis: {
 
27
                        reversed: true,
 
28
                        showFirstLabel: false,
 
29
                        showLastLabel: true
 
30
                    },
 
31
 
 
32
                    series: [{
 
33
                        name: 'AAPL Stock Price',
 
34
                        data: data,
 
35
                        threshold: null,
 
36
                        fillColor : {
 
37
                                        linearGradient : {
 
38
                                                x1: 0, 
 
39
                                                y1: 1, 
 
40
                                                x2: 0, 
 
41
                                                y2: 0
 
42
                                        },
 
43
                                        stops : [[0, Highcharts.getOptions().colors[0]], [1, 'rgba(0,0,0,0)']]
 
44
                                },
 
45
                                tooltip: {
 
46
                                        valueDecimals: 2
 
47
                                }
 
48
                    }]
 
49
                });
 
50
        });
 
51
});
 
52
                </script>
 
53
        </head>
 
54
        <body>
 
55
<script src="../../js/highstock.js"></script>
 
56
<script src="../../js/modules/exporting.js"></script>
 
57
 
 
58
<div id="container" style="height: 500px; min-width: 500px"></div>
 
59
        </body>
 
60
</html>