profile.js
1.98 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
var Profile = function() {
var dashboardMainChart = null;
return {
//main function
init: function() {
Profile.initMiniCharts();
},
initMiniCharts: function() {
// IE8 Fix: function.bind polyfill
if (App.isIE8() && !Function.prototype.bind) {
Function.prototype.bind = function(oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function() {},
fBound = function() {
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP();
return fBound;
};
}
$("#sparkline_bar").sparkline([8, 9, 10, 11, 10, 10, 12, 10, 10, 11, 9, 12, 11], {
type: 'bar',
width: '100',
barWidth: 6,
height: '45',
barColor: '#F36A5B',
negBarColor: '#e02222'
});
$("#sparkline_bar2").sparkline([9, 11, 12, 13, 12, 13, 10, 14, 13, 11, 11, 12, 11], {
type: 'bar',
width: '100',
barWidth: 6,
height: '45',
barColor: '#5C9BD1',
negBarColor: '#e02222'
});
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
Profile.init();
});
}