corrade-http-templates – Blame information for rev 2
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
2 | eva | 1 | <!DOCTYPE HTML> |
2 | <html> |
||
3 | <head> |
||
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||
5 | <title>Measuring Male-To-Female Ratio on a Simulator</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 | Highcharts.setOptions({ |
||
14 | global: { |
||
15 | useUTC: true |
||
16 | }, |
||
17 | colors: ['#69b4ff', '#FF69B4'] |
||
18 | }); |
||
19 | $('#container').highcharts({ |
||
20 | chart: { |
||
21 | type: 'pie', |
||
22 | options3d: { |
||
23 | enabled: true, |
||
24 | alpha: 45, |
||
25 | beta: 0 |
||
26 | }, |
||
27 | events: { |
||
28 | load: function () { |
||
29 | // set up the updating of the chart |
||
30 | var series = this.series; |
||
31 | setInterval(function () { |
||
32 | $.ajax({ |
||
33 | type: 'get', |
||
34 | url: "getMaleFemale.php", |
||
35 | data: "t=" + Math.random() |
||
36 | }).done(function(response) { |
||
37 | var a = $.map(response, function(e) { return e; }); |
||
38 | series[0].setData(a); |
||
39 | }); |
||
40 | }, 5000); |
||
41 | } |
||
42 | } |
||
43 | }, |
||
44 | title: { |
||
45 | text: '', |
||
46 | useHTML: false |
||
47 | }, |
||
48 | //title: { |
||
49 | // text: '<a href="secondlife://Puguet%20Sound/128/128/10">Puguet Sound</a> Male-to-Female Ratio', |
||
50 | // useHTML: true |
||
51 | //}, |
||
52 | credits: { |
||
53 | enabled: false |
||
54 | }, |
||
55 | tooltip: { |
||
56 | pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' |
||
57 | }, |
||
58 | plotOptions: { |
||
59 | pie: { |
||
60 | allowPointSelect: true, |
||
61 | cursor: 'pointer', |
||
62 | depth: 35, |
||
63 | dataLabels: { |
||
64 | enabled: true, |
||
65 | format: '{point.name}' |
||
66 | }, |
||
67 | showInLegend: true |
||
68 | } |
||
69 | }, |
||
70 | series: [{ |
||
71 | type: 'pie', |
||
72 | name: 'Gender Ratio', |
||
73 | data: [ |
||
74 | ["Male", 1], |
||
75 | ["Female", 1] |
||
76 | ] |
||
77 | }] |
||
78 | }); |
||
79 | }) |
||
80 | </script> |
||
81 | </head> |
||
82 | <body> |
||
83 | <script src="js/highcharts.js"></script> |
||
84 | <script src="js/exporting.js"></script> |
||
85 | |||
86 | <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> |
||
87 | |||
88 | </body> |
||
89 | </html> |
||
90 |