-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
126 lines (117 loc) · 4.12 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
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
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Interactive Bar Chart Report</title>
<meta name="description" content="" />
<meta name="author" content="boss" />
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="bower_components/foundation/css/normalize.css"/>
<link rel="stylesheet" type="text/css" href="bower_components/foundation/css/foundation.css"/>
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<style>
*, *:after, *:before {
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
html,body {
height:auto;
}
body {
/*background:#000000;
color:#f7f7f7;*/
background:#dddddd;
background:linear-gradient( #dddddd, #8B7D6B ) no-repeat ;
min-height:100%;
}
.wrapper {
max-width:800px;
margin: 0px auto;
background:#ffffff;
padding:20px;
}
.btn_display_chart {
display:inline-block;
padding:10px;
}
.live_chart{
width:100%;
max-width:760px
}
.hidden {
display:none;
}
</style>
</head>
<body>
<div class="wrapper">
<header>
<h1>Interactive Bar Chart Report</h1>
</header>
<article class="report">
<div class="chart"></div>
<div class="chart_container" data-bind="visible:display_chart,css:{hidden:display_chart === false}">
<h2>Chart</h2>
<div class="live_chart" data-bind="ReportChart:chartData"></div>
</div>
<!--<div id="drag"></div>
<div id="drop"></div>-->
<h2>Data Entry</h2>
<table>
<thead>
<tr>
<th></th>
<th data-bind="text:col_names[0]">5 inch gloss</th>
<th data-bind="text:col_names[1]">5 inch lustre</th>
<th data-bind="text:col_names[2]">6 inch gloss</th>
<th data-bind="text:col_names[3]">6 inch lustre</th>
</tr>
</thead>
<tbody data-bind="foreach: series">
<tr>
<th data-bind="text: name">Orders</th>
<td><input data-bind="value:data[0]" type="number" step="1"/></td>
<td><input data-bind="value:data[1]" type="number" step="1"/></td>
<td><input data-bind="value:data[2]" type="number" step="1"/></td>
<td><input data-bind="value:data[3]" type="number" step="1"/></td>
</tr>
</tbody>
</table>
<div data-bind="visible:completed">
<input class="btn_display_chart text-center" data-bind="click:function(data, event){set_chart_display(true)}" type="button" value="Display chart"/></a>
</div>
</article>
<footer>
<p>
© Copyright by kiddhustle
</p>
</footer>
</div>
<script type="application/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="application/javascript" src="bower_components/highcharts/highcharts.js"></script>
<script type="application/javascript" src="lib/draggable-points.js"></script>
<script type="application/javascript" src="bower_components/knockout/dist/knockout.debug.js"></script>
<script type="application/javascript" src="js/ko.binding.ReportChart.js"></script>
<script type="application/javascript" src="js/SeriesVM.js"></script>
<script type="application/javascript" src="js/ReportVM.js"></script>
<script type="application/javascript">
var oReport;
$(document).ready(function(){
var report_columns = ['5 inch gloss', '5 inch lustre','6 inch gloss', '6 inch lustre'];
oReport = new ReportVM( 'PaperShaker Sales', report_columns );
var seriesOrders = new SeriesVM( 'Orders', report_columns );
var seriesItems = new SeriesVM( 'Items', report_columns );
oReport.series.push( seriesOrders );
oReport.series.push( seriesItems );
console.log(oReport.chartData());
ko.applyBindings( oReport );
console.log(oReport);
});
</script>
</body>
</html>