This repository has been archived by the owner on May 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analyze.html
125 lines (100 loc) · 4.11 KB
/
analyze.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="index.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var numTracked = Number(localStorage.getItem("numTracked"));
var totalCookies = Number(localStorage.getItem("totalCookies"));
var remainingCookies = totalCookies - numTracked;
var potential = remainingCookies * .2;
remainingCookies = remainingCookies - potential;
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Non-tracking', remainingCookies],
['Tracking', numTracked],
['Potentially Tracking', potential]
]);
var options = {
title: 'Cookie Data',
width: '100vh',
height: '100vh',
legend: {
alignment: 'center',
position: 'top'
}
// chartArea: {
// left: "0%",
// top: "0%",
// height: "100%",
// width: "100%"
// },
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
window.onresize = drawChart;
</script>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.6.0/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<!-- <title>Hello, world!</title> -->
<!-- <style>
.vertScrollbar {
position: relative;
height: 800px;
overflow: auto;
}
.detail {
border-style: solid;
border-color: grey;
margin: 0em;
}
.detail p,b {
margin: 0;
padding: 0;
font-size: 30px;
}
.new{
padding: 0;
}
</style> -->
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div id="button">
<a class="navbar-brand" href="index.html">Cookie Monsterrr</a>
</div>
<!-- href contains a where the link goes to -->
<ul class="navbar-nav">
<!-- <li class="nav-item active">
<a class="nav-link" href="sample.html">Active</a>
</li> -->
<li class="nav-item">
<a class="nav-link" href="learn_more.html" target="_blank">Learn More</a>
</li>
<li class="nav-item">
<div id="button">
<a class="nav-link" href="analyze.html" target="_blank">Analyze</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/utk-cs/2019fall_ant-man/blob/master/README.md" target="_blank">Read Me</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li> -->
</ul>
</nav>
</head>
<body >
<div id="piechart" class="d-flex justify-content-center" style="width: 100vh; height: 100vh; display:block; margin:0 auto"></div>
</body>
</html>