Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 1
<!DOCTYPE HTML>
2
<html>
3
	<head>
4
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
		<title>Highcharts 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
 
14
    // Get the CSV and create the chart
15
    $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=analytics.csv&callback=?', function (csv) {
16
 
17
        $('#container').highcharts({
18
 
19
            data: {
20
                csv: csv
21
            },
22
 
23
            title: {
24
                text: 'Daily visits at www.highcharts.com'
25
            },
26
 
27
            subtitle: {
28
                text: 'Source: Google Analytics'
29
            },
30
 
31
            xAxis: {
32
                tickInterval: 7 * 24 * 3600 * 1000, // one week
33
                tickWidth: 0,
34
                gridLineWidth: 1,
35
                labels: {
36
                    align: 'left',
37
                    x: 3,
38
                    y: -3
39
                }
40
            },
41
 
42
            yAxis: [{ // left y axis
43
                title: {
44
                    text: null
45
                },
46
                labels: {
47
                    align: 'left',
48
                    x: 3,
49
                    y: 16,
50
                    format: '{value:.,0f}'
51
                },
52
                showFirstLabel: false
53
            }, { // right y axis
54
                linkedTo: 0,
55
                gridLineWidth: 0,
56
                opposite: true,
57
                title: {
58
                    text: null
59
                },
60
                labels: {
61
                    align: 'right',
62
                    x: -3,
63
                    y: 16,
64
                    format: '{value:.,0f}'
65
                },
66
                showFirstLabel: false
67
            }],
68
 
69
            legend: {
70
                align: 'left',
71
                verticalAlign: 'top',
72
                y: 20,
73
                floating: true,
74
                borderWidth: 0
75
            },
76
 
77
            tooltip: {
78
                shared: true,
79
                crosshairs: true
80
            },
81
 
82
            plotOptions: {
83
                series: {
84
                    cursor: 'pointer',
85
                    point: {
86
                        events: {
87
                            click: function (e) {
88
                                hs.htmlExpand(null, {
89
                                    pageOrigin: {
90
                                        x: e.pageX || e.clientX,
91
                                        y: e.pageY || e.clientY
92
                                    },
93
                                    headingText: this.series.name,
94
                                    maincontentText: Highcharts.dateFormat('%A, %b %e, %Y', this.x) + ':<br/> ' +
95
                                        this.y + ' visits',
96
                                    width: 200
97
                                });
98
                            }
99
                        }
100
                    },
101
                    marker: {
102
                        lineWidth: 1
103
                    }
104
                }
105
            },
106
 
107
            series: [{
108
                name: 'All visits',
109
                lineWidth: 4,
110
                marker: {
111
                    radius: 4
112
                }
113
            }, {
114
                name: 'New visitors'
115
            }]
116
        });
117
    });
118
 
119
});
120
		</script>
121
	</head>
122
	<body>
123
<script src="../../js/highcharts.js"></script>
124
<script src="../../js/modules/data.js"></script>
125
<script src="../../js/modules/exporting.js"></script>
126
 
127
<!-- Additional files for the Highslide popup effect -->
128
<script src="http://www.highcharts.com/joomla/media/com_demo/js/highslide-full.min.js"></script>
129
<script src="http://www.highcharts.com/joomla/media/com_demo/js/highslide.config.js" charset="utf-8"></script>
130
<link rel="stylesheet" type="text/css" href="http://www.highcharts.com/joomla/media/com_demo/highslide.css" />
131
 
132
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
133
 
134
	</body>
135
</html>