-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkpi2.html
More file actions
285 lines (241 loc) · 6.79 KB
/
kpi2.html
File metadata and controls
285 lines (241 loc) · 6.79 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<title>TTSS</title>
<style type="text/css">
.tiempo {
color: #FF0000;
font-size: 24px;
font-weight: bold;
text-align: center;
font-family: Verdana, Geneva, sans-serif;
}
.faltan {
color: #F63;
font-size: 24px;
font-weight: bold;
text-align: center;
font-family: Verdana, Geneva, sans-serif;
animation: blink-animation 5s steps(5, start) infinite;
-webkit-animation: blink-animation 5s steps(5, start) infinite;
}
@keyframes blink-animation {
to {
visibility: hidden;
}
}
@-webkit-keyframes blink-animation {
to {
visibility: hidden;
}
</style>
<script type='text/javascript'>//<![CDATA[
var cuenta = 0;
//cuenta = 16;
var resta;// = 33 - cuenta;
$.get("http://aerometalls.com/kpi/file/KPI2.csv", function(data) {
// Split the lines
var lines = data.split('\n');
var data = [];
var data2 = [];
// Iterate over the lines and add categories or series
$.each(lines, function(lineNo, line) {
if(line) {
cuenta = cuenta + 1;
//var items = line.split(', ');
var items = line.split(',');
data.push([
lineNo,
items[0],
getTimeStamp(items[1]),
getTimeStamp(items[2])
]);
data2.push([
lineNo,
getTimeStamp(items[2])
]);
}
});
resta = 33 - cuenta;
// Create the chart
Highcharts.chart('container', {
chart: {
inverted: true
},
title: {
text: 'TTSS'
},
xAxis: {
type: 'category'
},
yAxis: {
type: 'datetime',
minPadding: 0,
startOnTick: false
},
tooltip: {
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.high:%b %e, %H:%M} - {point.low:%b %e, %H:%M}</b><br/>'
},
series: [{
type: 'columnrange',
name: 'Hora',
data: data,
keys: ['x','name','low','high']
}, {
type: 'scatter',
data: data2,
dataLabels: {
enabled: true,
allowOverlap: true,
color: 'red',
style: { fontFamily: '\'Lato\', sans-serif', lineHeight: '18px', fontSize: '30px' },
//format: '{point.x}'
formatter: function(){
return this.x + 1;
}
},
enableMouseTracking: false,
color: 'yellow',
linkedTo: 's1'
}],
credits: {
enabled: false
}
});
$('#container1').highcharts({
chart: {
type: 'gauge',
plotBackgroundColor: null,
plotBackgroundImage: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Objetivo 33 Carros'
},
pane: {
startAngle: -90,
endAngle: 90,
background: null
},
plotOptions: {
gauge: {
dataLabels: {
enabled: false
},
dial: {
baseLength: '0%',
baseWidth: 10,
radius: '100%',
rearLength: '0%',
topWidth: 1
}
}
},
// the value axis
yAxis: {
labels: {
enabled: true,
x: 15, y: -5
},
tickPositions: [11, 22, 33],
minorTickLength: 0,
min: 0,
max: 33,
plotBands: [{
from: 0,
to: 11,
color: 'rgb(192, 0, 0)', // red
thickness: '50%'
}, {
from: 11,
to: 22,
color: 'rgb(255, 192, 0)', // yellow
thickness: '50%'
}, {
from: 22,
to: 33,
color: 'rgb(155, 187, 89)', // green
thickness: '50%'
}]
},
series: [{
name: 'Carros',
data: [cuenta]
}],
credits: {
enabled: false
}
});
$('#FALTAN_CARROS').html('FALTAN ' + resta + ' CARROS');
});
function getTimeStamp(rawData) {
var date = rawData.split(/[/ :]/);
//return Date.UTC(date[2],date[1],date[0],date[3],date[4]);
return Date.UTC("2017",date[1]-1,date[0],date[3],date[4]);
}
//]]>
</script>
</head>
<body>
<!--<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>-->
<script src="./js/highcharts.js"></script>
<script src="./js/highcharts-more.js"></script>
<script src="./js/exporting.js"></script>
<script type="text/javascript" src="./js/CountDownJS.js"></script>
<!--<div id="container" style="min-width: 500px; height: 800px; margin: 0 auto"></div-->
<table align="left" width="100%" height="100%">
<tr>
<td align="left" width="85%">
<div align="left" id="container" style="height: 800px; margin: 0 auto"></div>
</td>
<td width="15%" valign="top">
<div id="container1"></div>
<BR>
<BR>
<div id="queda">
<span id="FALTAN_CARROS" class="faltan"></span>
</div>
<BR>
<BR>
<div id="queda"><span class="tiempo">TIEMPO RESTANTE :</span></div>
<div align="center" style = "margin-bottom: 100px; width: 90%">
<script>
var today = new Date();
//edsa01 Hasta las 22:00
var myToday = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 22, 0, 0);
countDown1 = new CountDownObject(); //add countdown as object
countDown1.TIMESTAMP = myToday,
// edsa01 15.11.2017 countDown1.TIME_ZONE = +5, // your time zone (-12 ... +14)
countDown1.TIME_ZONE = +3, // your time zone (-12 ... +14)
/* Your date and time
countDown1.SET_YOUR_SEC = 0,
countDown1.SET_YOUR_MIN = 0,
countDown1.SET_YOUR_HOUR = 22,
countDown1.SET_YOUR_DAY = 28,
countDown1.SET_YOUR_MONTH = 04,
countDown1.SET_YOUR_YEAR = 2017,
*/
countDown1.NUM_OF_ELEMENTS = 6, // number of flip-elements(from 1 to 9)
countDown1.TIME_ANIMATION = 950, // time of flip animation in milliseconds(from 50 to 950)
countDown1.BACK_COLOR = "#f07000", // flip-element back color
countDown1.DIGITS_COLOR = "#f0d070", // digits color on flip-elements
countDown1.TEXT_COLOR = "#e0e0e0", // text color under flip elements(seconds, minutes and etc.)
countDown1.IS_DYNAMIC_COLOR = true, // back color will vary(true or false)
countDown1.CANVAS_NAME = "CountDownCanvas"; //canvas name in html-code
countDown1.Start(); //start countdown
</script>
</div>
</td>
</tr>
</table>
</body>
</html>