-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
81 lines (72 loc) · 3.68 KB
/
index2.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
<!DOCTYPE html>
<head>
<title>Pivot Demo</title>
<link rel="stylesheet" type="text/css" href="lib/pivottable/dist/pivot.css">
<link rel="stylesheet" type="text/css" href="reporter.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="reporter.js"></script>
<script type="text/javascript" src="lib/pivottable/dist/pivot.js"></script>
<script type="text/javascript" src="data/keys.js"></script>
<script type="text/javascript" src="data/cols.js"></script>
<script type="text/javascript" src="data/defaults.js"></script>
<script type="text/javascript" src="data/data.js"></script>
<script type="text/javascript" src="lib/tableExport/libs/jsPDF/jspdf.min.js"></script>
<script type="text/javascript" src="lib/tableExport/libs/jsPDF-AutoTable/jspdf.plugin.autotable.js"></script>
<script type="text/javascript" src="lib/tableExport/libs/FileSaver/FileSaver.min.js"></script>
<script type="text/javascript" src="lib/tableExport/tableExport.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var keys = getKeys();
reporter($("#output1"), getData(), keys, ["5"], ["7"], [
["col", 0, 2, -1, "Percent No", "percent", []],
["col", 1, 2, -1, "Percent Yes", "percent", []],
["col", 0, 0, -1, "Acceptible", "label", ["yes", "no", "extra(total)"]]
]);
reporter($("#output2"), getData(), keys, ["5", "6"], ["7"], [
["col", 0, 2, -1, "Percent No", "percent", []],
["col", 1, 2, -1, "Percent Yes", "percent", []],
["col", 0, 0, -1, "Acceptible", "label", ["yes", "no", "yes", "no", "yes", "no"]]
]);
reporter($("#output3"), getData(), keys, ["6", "5"], ["10"], [
["rmTotalRows"]
]);
reporter($("#output4"), getData(), keys, ["10"], ["6", "5"], [
["col", 0, 6, -1, "Percent No", "percent", []],
["col", 1, 6, -1, "Percent Yes", "percent", []],
["col", 0, 0, -1, "Acceptible Percentile", "label", ["1%", "2%", "5%", "7%", "4%", "2%", "1%", "3%", "6%", "2%", "3%", "4%"]],
["rmTotals"]
]);
reporter($("#output5"), getData(), keys, ["10"], ["6", "5"], [
["col", 0, 6, -1, "Percent No", "percent", []],
["col", 1, 6, -1, "Percent Yes", "percent", []],
["col", 0, 0, -1, "Acceptible Percentile", "label", ["1%", "2%", "5%", "7%", "4%", "2%", "1%", "3%", "6%", "2%", "3%", "4%"]]
]);
});
</script>
</head>
<body>
<div id="output1" style="margin: 30px;"></div>
<br />
<a href="#" onclick="$('#output1 > table.pvtTable').tableExport({type:'pdf'});">PDF</a>
<a href="#" onclick="$('#output1 > table.pvtTable').tableExport({type:'pdf', jspdf: {orientation: 'landscape', format: 'bestfit'}});">PDF</a>
<a href="#" onclick="$('#output1 > table.pvtTable').tableExport({type:'excel', tableSelector: '.pvtTable'});">Excel</a>
<br />
<div id="output2" style="margin: 30px;"></div>
<br />
<br />
<div id="output3" style="margin: 30px;"></div>
<br />
<br />
<div id="output4" style="margin: 30px;"></div>
<br />
<br />
<div id="output5" style="margin: 30px;"></div>
<br />
<a href="#" onclick="$('#output5 > table.pvtTable').tableExport({type:'pdf'});">PDF</a>
<a href="#" onclick="$('#output5 > table.pvtTable').tableExport({type:'pdf', jspdf: {orientation: 'p',margins: {left:20, top:10},autotable: false}});">PDF</a>
<a href="#" onclick="$('#output5 > table.pvtTable').tableExport({type:'excel', tableSelector: '.pvtTable'});">Excel</a>
<br />
</body>