-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstatspage.html
103 lines (84 loc) · 2.73 KB
/
statspage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<link rel="stylesheet" href="statspage.css" />
<html>
<br>
<h1> <center> Green Go! </center></h1>
<body id="yay">
<ul>
<li><a href="default.asp">Home</a></li>
<li><a href="news.asp">Stat Group #1</a></li>
<li><a href="contact.asp">Stat Group #2</a></li>
<li><a href="about.asp">Logout</a></li>
</ul>
<br>
<br>
<br>
<center>
<script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer1" style="width: 45%; height: 300px;display: block-level;"></div>
<br>
<br>
<br>
<div id="chartContainer2" style="width: 45%; height: 300px;display: block-level;"></div><br/>
<script>var chart = new CanvasJS.Chart("chartContainer1",
{
animationEnabled: true,
title: {
text: "Returned To-Go Boxes by Class"
},
axisX: {
interval: 10,
},
data: [
{
type: "column",
color: "rgba(89,139,44,1)",
dataPoints: [
{ x: 10, y: 2000, label: "Freshmen" },
{ x: 20, y: 700, label: "Sophomore" },
{ x: 30, y: 1200, label: "Junior" },
{ x: 40, y: 1000, label: "Senior" },
]
},
]
});
chart.render();
var chart = new CanvasJS.Chart("chartContainer2",
{
animationEnabled: true,
title: {
text: "Breakdown of To-Go Boxes Used at Dining Halls",
},
data: [
{
type: "pie",
showInLegend: true,
dataPoints: [
{ y: 4190, legendText: "D1", indexLabel: "Dining Hall 1" },
{ y: 2175, legendText: "D2", indexLabel: "Dining Hall 2" },
{ y: 3125, legendText: "D3", indexLabel: "Dining Hall 3" },
{ y: 1176, legendText: "D4", indexLabel: "Dining Hall 4" },
{ y: 1727, legendText: "D5", indexLabel: "Dining Hall 5" },
{ y: 4308, legendText: "D6", indexLabel: "Dining Hall 6" },
{ y: 1717, legendText: "D7", indexLabel: "Dining Hall 7" }
]
},
]
});
chart.render();
chart.render();</script>
<script>
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "rts49.mysql.database.azure.com",
password: "KFi70EOCQvW8RKzyXets!"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
</script>
</center>
</body>
</html>