college_admin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,84 @@
1
+ !function($) {
2
+ "use strict";
3
+
4
+ var Dashboard1 = function() {
5
+ this.$realData = []
6
+ };
7
+
8
+ //creates Stacked chart
9
+ Dashboard1.prototype.createStackedChart = function(element, data, xkey, ykeys, labels, lineColors) {
10
+ Morris.Bar({
11
+ element: element,
12
+ data: data,
13
+ xkey: xkey,
14
+ ykeys: ykeys,
15
+ stacked: true,
16
+ labels: labels,
17
+ hideHover: 'auto',
18
+ resize: true, //defaulted to true
19
+ gridLineColor: '#eeeeee',
20
+ barColors: lineColors
21
+ });
22
+ },
23
+
24
+ //creates area chart with dotted
25
+ Dashboard1.prototype.createAreaChartDotted = function(element, pointSize, lineWidth, data, xkey, ykeys, labels, Pfillcolor, Pstockcolor, lineColors) {
26
+ Morris.Area({
27
+ element: element,
28
+ pointSize: 0,
29
+ lineWidth: 0,
30
+ data: data,
31
+ xkey: xkey,
32
+ ykeys: ykeys,
33
+ labels: labels,
34
+ hideHover: 'auto',
35
+ pointFillColors: Pfillcolor,
36
+ pointStrokeColors: Pstockcolor,
37
+ resize: true,
38
+ gridLineColor: '#eef0f2',
39
+ lineColors: lineColors
40
+ });
41
+
42
+ },
43
+
44
+
45
+ Dashboard1.prototype.init = function() {
46
+
47
+ //creating Stacked chart
48
+ var $stckedData = [
49
+ { y: '2005', a: 45, b: 180, c: 100 },
50
+ { y: '2006', a: 75, b: 65, c: 80 },
51
+ { y: '2007', a: 100, b: 90, c: 56 },
52
+ { y: '2008', a: 75, b: 65, c: 89 },
53
+ { y: '2009', a: 100, b: 90, c: 120 },
54
+ { y: '2010', a: 75, b: 65, c: 110 },
55
+ { y: '2011', a: 50, b: 40, c: 85 },
56
+ { y: '2012', a: 75, b: 65, c: 52 },
57
+ { y: '2013', a: 50, b: 40, c: 77 },
58
+ { y: '2014', a: 75, b: 65, c: 90 },
59
+ { y: '2015', a: 100, b: 90, c: 130 }
60
+ ];
61
+ this.createStackedChart('morris-bar-stacked', $stckedData, 'y', ['a', 'b', 'c'], ['Desktops', 'Tablets', 'Mobiles'], ['#5fbeaa', '#5d9cec', '#ebeff2']);
62
+
63
+ //creating area chart
64
+ var $areaDotData = [
65
+ { y: '2009', a: 10, b: 20, c:30 },
66
+ { y: '2010', a: 75, b: 65, c:30 },
67
+ { y: '2011', a: 50, b: 40, c:30 },
68
+ { y: '2012', a: 75, b: 65, c:30 },
69
+ { y: '2013', a: 50, b: 40, c:30 },
70
+ { y: '2014', a: 75, b: 65, c:30 },
71
+ { y: '2015', a: 90, b: 60, c:30 }
72
+ ];
73
+ this.createAreaChartDotted('morris-area-with-dotted', 0, 0, $areaDotData, 'y', ['a', 'b', 'c'], ['Desktops ', 'Tablets ', 'Mobiles '],['#ffffff'],['#999999'], ['#5fbeaa', '#5d9cec','#ebeff2']);
74
+
75
+ },
76
+ //init
77
+ $.Dashboard1 = new Dashboard1, $.Dashboard1.Constructor = Dashboard1
78
+ }(window.jQuery),
79
+
80
+ //initializing
81
+ function($) {
82
+ "use strict";
83
+ $.Dashboard1.init();
84
+ }(window.jQuery);