-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfooter.php
129 lines (108 loc) · 2.69 KB
/
footer.php
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
<!-- END WRAPPER -->
<!-- Javascript -->
<script src="../assets/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="../assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="../assets/vendor/jquery.easy-pie-chart/jquery.easypiechart.min.js"></script>
<script src="../assets/vendor/chartist/js/chartist.min.js"></script>
<script src="../assets/scripts/klorofil-common.js"></script>
<script>
$(function() {
var data, options;
// headline charts
data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
series: [
[23, 29, 24, 40, 25, 24, 35],
[14, 25, 18, 34, 29, 38, 44],
]
};
options = {
height: 300,
showArea: true,
showLine: false,
showPoint: false,
fullWidth: true,
axisX: {
showGrid: false
},
lineSmooth: false,
};
new Chartist.Line('#headline-chart', data, options);
// visits trend charts
data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
series: [{
name: 'series-real',
data: [200, 380, 350, 320, 410, 450, 570, 400, 555, 620, 750, 900],
}, {
name: 'series-projection',
data: [240, 350, 360, 380, 400, 450, 480, 523, 555, 600, 700, 800],
}]
};
options = {
fullWidth: true,
lineSmooth: false,
height: "270px",
low: 0,
high: 'auto',
series: {
'series-projection': {
showArea: true,
showPoint: false,
showLine: false
},
},
axisX: {
showGrid: false,
},
axisY: {
showGrid: false,
onlyInteger: true,
offset: 0,
},
chartPadding: {
left: 20,
right: 20
}
};
new Chartist.Line('#visits-trends-chart', data, options);
// visits chart
data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
series: [
[6384, 6342, 5437, 2764, 3958, 5068, 7654]
]
};
options = {
height: 300,
axisX: {
showGrid: false
},
};
new Chartist.Bar('#visits-chart', data, options);
// real-time pie chart
var sysLoad = $('#system-load').easyPieChart({
size: 130,
barColor: function(percent) {
return "rgb(" + Math.round(200 * percent / 100) + ", " + Math.round(200 * (1.1 - percent / 100)) + ", 0)";
},
trackColor: 'rgba(245, 245, 245, 0.8)',
scaleColor: false,
lineWidth: 5,
lineCap: "square",
animate: 800
});
var updateInterval = 3000; // in milliseconds
setInterval(function() {
var randomVal;
randomVal = getRandomInt(0, 100);
sysLoad.data('easyPieChart').update(randomVal);
sysLoad.find('.percent').text(randomVal);
}, updateInterval);
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
});
</script>
</body>
</html>