-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (78 loc) · 2.25 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>AD stats</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.4.3/js/tabulator.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.4.3/css/tabulator_simple.min.css">
</head>
<body>
<h1>Hero Stats</h1>
<div id="hero_stats"></div>
<h1>Ability Stats</h1>
<div id="ability_stats"></div>
</body>
<style type="text/css">
body{
font-family: 'Arial';
}
</style>
<script type="text/javascript">
$( document ).ready(function() {
var table_heroes = new Tabulator("#hero_stats", {
ajaxURL:"http://f5e9f559.ngrok.io/heroes",
height:"45vh",
width: "100vw",
initialSort: {column:"adj_win_rate", dir:"desc"},
// autoColumns : true,
columns:[
{'title' : 'Hero' , 'field' : 'name'},
{'title' : 'Total Games' , 'field' : 'games'},
{'title' : 'Wins' , 'field' : 'win'},
{'title' : 'Loses' , 'field' : 'lose'},
{'title' : 'Adjusted Win Rate', 'field':'adj_win_rate', formatter:"money", formatterParams:{
decimal:",",
thousand:".",
symbol:"%",
symbolAfter:"%",
precision:false,
}},
{'title' : 'Win Rate', 'field':'win_rate', formatter:"money", formatterParams:{
decimal:",",
thousand:".",
symbol:"%",
symbolAfter:"%",
precision:false,
}}
]
});
var table_abilities = new Tabulator("#ability_stats", {
ajaxURL:"http://f5e9f559.ngrok.io/abilities",
height:"45vh",
width: "100vw",
initialSort: {column:"adj_win_rate", dir:"desc"},
// autoColumns : true,
columns:[
{'title' : 'Ability' , 'field' : 'name'},
{'title' : 'Total Games' , 'field' : 'games'},
{'title' : 'Wins' , 'field' : 'win'},
{'title' : 'Loses' , 'field' : 'lose'},
{'title' : 'Adjusted Win Rate', 'field':'adj_win_rate', formatter:"money", formatterParams:{
decimal:",",
thousand:".",
symbol:"%",
symbolAfter:"%",
precision:false,
}},
{'title' : 'Win Rate', 'field':'win_rate', formatter:"money", formatterParams:{
decimal:",",
thousand:".",
symbol:"%",
symbolAfter:"%",
precision:false,
}}
]
});
});
</script>
</html>