]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('Admin.view.dashboard.Services', {\r |
2 | extend: 'Ext.Panel',\r | |
3 | xtype: 'services',\r | |
4 | \r | |
5 | requires: [\r | |
6 | 'Ext.chart.series.Pie',\r | |
7 | 'Ext.chart.series.sprite.PieSlice',\r | |
8 | 'Ext.chart.interactions.Rotate'\r | |
9 | ],\r | |
10 | \r | |
11 | cls: 'service-type',\r | |
12 | height: 320,\r | |
13 | bodyPadding: 15,\r | |
14 | title: 'Services',\r | |
15 | layout: 'vbox',\r | |
16 | \r | |
17 | items: [\r | |
18 | {\r | |
19 | xtype: 'container',\r | |
20 | layout: 'hbox',\r | |
21 | items: [\r | |
22 | {\r | |
23 | xtype: 'polar',\r | |
24 | height: 124,\r | |
25 | width: 132,\r | |
26 | insetPadding: '4 8 7 0',\r | |
27 | background: 'rgba(255, 255, 255, 1)',\r | |
28 | colors: [\r | |
29 | '#6aa5dc',\r | |
30 | '#fdbf00',\r | |
31 | '#ee929d'\r | |
32 | ],\r | |
33 | bind: '{servicePerformance}',\r | |
34 | series: [\r | |
35 | {\r | |
36 | type: 'pie',\r | |
37 | label: {\r | |
38 | field: 'xField',\r | |
39 | display: 'rotate',\r | |
40 | contrast: true,\r | |
41 | font: '12px Arial'\r | |
42 | },\r | |
43 | useDarkerStrokeColor: false,\r | |
44 | xField: 'yvalue',\r | |
45 | donut: 50,\r | |
46 | padding:0\r | |
47 | }\r | |
48 | ],\r | |
49 | interactions: [\r | |
50 | {\r | |
51 | type: 'rotate'\r | |
52 | }\r | |
53 | ]\r | |
54 | },\r | |
55 | {\r | |
56 | xtype: 'container',\r | |
57 | flex: 1,\r | |
58 | layout: {\r | |
59 | type: 'vbox',\r | |
60 | align: 'stretch',\r | |
61 | pack: 'center'\r | |
62 | },\r | |
63 | items: [\r | |
64 | {\r | |
65 | xtype:'component',\r | |
66 | data: {\r | |
67 | name: 'Finance',\r | |
68 | value: '20%'\r | |
69 | },\r | |
70 | tpl: '<div class="left-aligned-div">{name}</div><div class="right-aligned-div">{value}</div>'\r | |
71 | },\r | |
72 | {\r | |
73 | xtype: 'progress',\r | |
74 | ui: 'finance',\r | |
75 | userCls: 'bottom-indent service-finance',\r | |
76 | height: 4,\r | |
77 | minHeight: 4,\r | |
78 | value: 0.2\r | |
79 | },\r | |
80 | {\r | |
81 | xtype:'component',\r | |
82 | data: {\r | |
83 | name: 'Research',\r | |
84 | value: '68%'\r | |
85 | },\r | |
86 | tpl: '<div class="left-aligned-div">{name}</div><div class="right-aligned-div">{value}</div>'\r | |
87 | },\r | |
88 | {\r | |
89 | xtype: 'progress',\r | |
90 | ui: 'research',\r | |
91 | userCls: 'bottom-indent service-research',\r | |
92 | height: 4,\r | |
93 | minHeight: 4,\r | |
94 | value: 0.68\r | |
95 | },\r | |
96 | {\r | |
97 | xtype:'component',\r | |
98 | data: {\r | |
99 | name: 'Marketing',\r | |
100 | value: '12%'\r | |
101 | },\r | |
102 | tpl: '<div class="left-aligned-div">{name}</div><div class="right-aligned-div">{value}</div>'\r | |
103 | },\r | |
104 | {\r | |
105 | xtype: 'progress',\r | |
106 | ui: 'marketing',\r | |
107 | userCls: 'service-marketing',\r | |
108 | height: 4,\r | |
109 | value: 0.12\r | |
110 | }\r | |
111 | ]\r | |
112 | }\r | |
113 | ]\r | |
114 | },\r | |
115 | {\r | |
116 | xtype: 'container',\r | |
117 | layout: {\r | |
118 | type: 'hbox',\r | |
119 | align: 'center'\r | |
120 | },\r | |
121 | items: [{\r | |
122 | xtype: 'polar',\r | |
123 | platformConfig: {\r | |
124 | phone: {\r | |
125 | hidden: true\r | |
126 | }\r | |
127 | },\r | |
128 | height: 124,\r | |
129 | width: 132,\r | |
130 | insetPadding: '7 8 4 0',\r | |
131 | background: 'rgba(255, 255, 255, 1)',\r | |
132 | colors: [\r | |
133 | '#6aa5dc',\r | |
134 | '#fdbf00',\r | |
135 | '#ee929d'\r | |
136 | ],\r | |
137 | bind: {\r | |
138 | store: '{servicePerformance}'\r | |
139 | },\r | |
140 | series: [\r | |
141 | {\r | |
142 | type: 'pie',\r | |
143 | label: {\r | |
144 | field: 'xField',\r | |
145 | display: 'rotate',\r | |
146 | contrast: true,\r | |
147 | font: '12px Arial'\r | |
148 | },\r | |
149 | useDarkerStrokeColor: false,\r | |
150 | xField: 'yvalue',\r | |
151 | donut: 50,\r | |
152 | padding:0\r | |
153 | }\r | |
154 | ],\r | |
155 | interactions: [\r | |
156 | {\r | |
157 | type: 'rotate'\r | |
158 | }\r | |
159 | ]\r | |
160 | },{\r | |
161 | xtype: 'component',\r | |
162 | flex: 1,\r | |
163 | html: '<div class="services-text">' +\r | |
164 | 'The year 2015 saw a significant change in the job market ' +\r | |
165 | 'for the industry. With increasing goverment expenditure on research & development, jobs in ' +\r | |
166 | 'the research sector rose to 68% from 47% in the previous financial year. Share of jobs in ' +\r | |
167 | 'the finance sector remained more or less constant while that in marketing sector dropped to ' +\r | |
168 | '12%. The reduction in marketing jobs is attributed to increasing use of online advertising ' +\r | |
169 | 'in recent years, which is largely automated.' +\r | |
170 | '</div>' +\r | |
171 | '<div class="services-legend">' +\r | |
172 | '<div class="legend-item"><span class="legend-icon legend-finance"></span><span class="legend-text">Finance</span></div>' +\r | |
173 | '<div class="legend-item"><span class="legend-icon legend-research"></span><span class="legend-text">Research</span></div>' +\r | |
174 | '<div class="legend-item"><span class="legend-icon legend-marketing"></span><span class="legend-text">Marketing</span></div>' +\r | |
175 | '<div>'\r | |
176 | }]\r | |
177 | }\r | |
178 | ]\r | |
179 | });\r |