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
var Widgets = function () {
var handleMapplic = function () {
$('#mapplic').mapplic({
source: '../../assets/global/plugins/mapplic/world.json',
height: 265,
animate: false,
sidebar: false,
minimap: false,
locations: true,
deeplinking: true,
fullscreen: false,
hovertip: true,
zoombuttons: false,
clearbutton: false,
developer: false,
maxscale: 2,
skin: 'mapplic-dark',
zoom: true
});
}
var handleSparklineChart = function () {
$("#widget_sparkline_bar").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], {
type: 'bar',
width: '100',
barWidth: 5,
height: '30',
barColor: '#4db3a4',
negBarColor: '#e02222'
});
$("#widget_sparkline_bar2").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], {
type: 'bar',
width: '100',
barWidth: 5,
height: '30',
barColor: '#f36a5a',
negBarColor: '#e02222'
});
$("#widget_sparkline_bar3").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], {
type: 'bar',
width: '100',
barWidth: 5,
height: '30',
barColor: '#5b9bd1',
negBarColor: '#e02222'
});
$("#widget_sparkline_bar4").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], {
type: 'bar',
width: '100',
barWidth: 5,
height: '30',
barColor: '#9a7caf',
negBarColor: '#e02222'
});
}
var handleCounter = function () {
$('.counter').counterUp({
delay: 10,
time: 1000
});
}
return {
// main function
init: function () {
handleMapplic(); // handle mapplic map
handleSparklineChart(); // handle sparkline chart
handleCounter(); // handle counter
}
};
}();
jQuery(document).ready(function() {
Widgets.init();
});