-
Notifications
You must be signed in to change notification settings - Fork 0
/
duckDivisionsWebsite.html
86 lines (75 loc) · 3.13 KB
/
duckDivisionsWebsite.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
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<link href="https://unpkg.com/[email protected]/dist/css/tabulator_modern.min.css" rel="stylesheet">
<style>
body{
background-color:#fff;
}
</style>
<body>
<div id="data-table"></div>
<div id="alerts"></div>
<div id="example-table-theme"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/luxon/2.4.0/luxon.min.js" integrity="sha512-v1zUTZ9zv9Wb2scL/ANxXM6m7yegm/W5SN8SRHNFADdZIuSFFkrEBjNxO803DdFkjoCcJ88g1WHRVlLN6K/O1A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/luxon/2.4.0/luxon.js" integrity="sha512-mG5s2PtixGEVGHGdHEP/t09HMp5LS4O7tGSveeGniCbzeZKIxsPdmExeabz8xmxcSe+wfYvSMbe6G2c3d9ZQXQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
<script>
// http://tabulator.info/
const elements = {}
document.addEventListener("DOMContentLoaded",pageLoad)
function pageLoad(){
elements.alerts = document.getElementById("alerts")
loadData()
}
function loadData(){
google.script.run
.withSuccessHandler((jsData) => {
const table = new Tabulator("#data-table", {
// if data successfully
data:jsData, //assign data to table
layout:"fitColumns", //fit columns to width of table (optional)
//pagination:true,
//paginationSize:8,
columnDefaults:{
hozAlign:"center",
headerHozAlign:"center",
headerSort:true
},
columns:[ //Define Table Columns
{
title: "Team Info",
columns: [
{title:"Seed", field:"Seed", headerSort:true, width:75},
{title:"Team", field:"Team", headerSort:false, width:175},
],
},
{
title: "Averages",
columns: [
{title:"Kills", field:"AVG Kills", headerSort:true},
{title:"Deaths", field:"AVG Deaths", headerSort:true},
{title:"Assists", field:"AVG Assists", headerSort:true},
{title:"Game Time", field:"AVG Game Time", headerSort:true, width:125},
],
},
{
title: "Totals",
columns: [
{title:"Dragons", field:"Total Dragons", headerSort:true},
{title:"Heralds", field:"Total Heralds", headerSort:true},
{title:"Barons", field:"Total Barons", headerSort:true},
{title:"Towers", field:"Total Towers", headerSort:true},
],
},
],
})
})// end of SuccessHandler for jsData
.withFailureHandler((er) => {
})// end of SuccessHandler for jsData
.getData()
}
</script>
</body>
</html>