Просмотр исходного кода

中心大数据通话接通率重新写布局

zhangshuangnan лет назад: 8
Родитель
Сommit
87242f49cd
1 измененных файлов с 63 добавлено и 57 удалено
  1. 63 57
      js/zhongxin.js

+ 63 - 57
js/zhongxin.js

@@ -10,61 +10,52 @@ angular.module('zhongxin', [])
10 10
 //			$('#jtv_num').css("height", height_div);
11 11
 //		});
12 12
 
13
-
14
-		$('#slhw').highcharts({
15
-			chart: {
16
-				type: 'pie',
17
-				backgroundColor: '#100e11',
18
-				options3d: {
19
-					enabled: true,
20
-					alpha: 45,
21
-					beta: 0
22
-				}
23
-			},
24
-			title: {
25
-				text: '受理渠道话务量',
26
-				style: {
13
+		//接通率
14
+	
15
+		var slhw = echarts.init(document.getElementById('slhw'));
16
+		option = {
17
+    title : {
18
+        text: '接通率统计源',
19
+        x:'center',
20
+        textStyle: {
27 21
 					color: '#fff',
22
+					fontSize: 16,
23
+					fontWeight:'normal'
28 24
 				}
29
-			},
30
-			//LOGO 去掉
31
-			credits: {
32
-				enabled: false
33
-			},
34
-			tooltip: {
35
-				pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
25
+    },
26
+    tooltip : {
27
+        trigger: 'item',
28
+        formatter: "{a} <br/>{b} : {c} ({d}%)"
29
+    },
30
+   
31
+    series : [
32
+        {
33
+            name: '话务量',
34
+            type: 'pie',
35
+            radius : '60%',
36
+            center: ['50%', '55%'],
37
+            data:[
38
+                {value:335, name:'微信', selected:true},
39
+                {value:310, name:'短信'},
40
+                {value:234, name:'微博'},
41
+                {value:135, name:'邮件'},
42
+                {value:148, name:'QQ'}
43
+            ],
44
+            itemStyle: {
45
+                emphasis: {
46
+                    shadowBlur: 10,
47
+                    shadowOffsetX: 0,
48
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
49
+                }
50
+            }
51
+        }
52
+    ],
53
+    color:['#91c7ae','#d48265','#61a0a8','#c23531','#2bdbcd']
54
+};
55
+		
56
+		slhw.setOption(option);
57
+		
36 58
 			
37
-			},
38
-			plotOptions: {
39
-				pie: {
40
-					allowPointSelect: true,
41
-					cursor: 'pointer',
42
-					depth: 35,
43
-					dataLabels: {
44
-						enabled: true,
45
-						format: '<b style="font-size:14px; ">{point.name}</b>: <b>{point.percentage:.1f}%</b>'
46
-					}
47
-				}
48
-			},
49
-			series: [{
50
-				type: 'pie',
51
-				name: '受理渠道话务量',
52
-				data: [
53
-					['电话', 45.0],
54
-					['网站门户', 26.8],
55
-					{
56
-						name: 'APP',
57
-						y: 12.8,
58
-						sliced: true,
59
-						selected: true
60
-					},
61
-					['微信', 8.5],
62
-					['短信', 6.2],
63
-					['微博', 0.7],
64
-					['邮件', 10.5],
65
-				]
66
-			}]
67
-		});
68 59
 	
69 60
 		//通话数量
70 61
 		$('#th_num').highcharts({
@@ -152,6 +143,7 @@ angular.module('zhongxin', [])
152 143
 				data: [8, 4, 5, 8, 11, 15, 17, 16, 14, 10, 6, 4]
153 144
 			}]
154 145
 		});
146
+		
155 147
 		//接通率报表
156 148
 		var jtv = echarts.init(document.getElementById('jtv_num'));
157 149
 		option = {
@@ -160,7 +152,8 @@ angular.module('zhongxin', [])
160 152
 				x: 'center',
161 153
 				textStyle: {
162 154
 					color: '#fff',
163
-					fontSize: 16
155
+					fontSize: 16,
156
+					fontWeight:'normal'
164 157
 				}
165 158
 			},
166 159
 			tooltip: {
@@ -181,13 +174,13 @@ angular.module('zhongxin', [])
181 174
 				}
182 175
 			},
183 176
 			xAxis: {
184
-				data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],
177
+				data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
185 178
 				axisLine: {
186 179
 					lineStyle: {
187 180
 						color: '#ccc'
188
-				
189 181
 					}
190 182
 				},
183
+			
191 184
 
192 185
 			},
193 186
 			yAxis: {
@@ -209,10 +202,10 @@ angular.module('zhongxin', [])
209 202
 			}, {
210 203
 				name: '接通量',
211 204
 				type: 'bar',
212
-				barWidth: 10,
205
+				barWidth: 8,
213 206
 				itemStyle: {
214 207
 					normal: {
215
-						barBorderRadius: 5,
208
+//						barBorderRadius: 5,
216 209
 						color: new echarts.graphic.LinearGradient(
217 210
 							0, 0, 0, 1, [
218 211
 								{ offset: 0, color: '#14c8d4' },
@@ -222,6 +215,19 @@ angular.module('zhongxin', [])
222 215
 					}
223 216
 				},
224 217
 				data: [20, 33, 80, 14, 60, 42, 99, 22, 36, 19,25,30,45,80,65,55,42,50,55,66,36,23,20,21]
218
+			},{
219
+				name: '未接量',
220
+				type: 'line',
221
+				smooth: true,
222
+				showAllSymbol: true,
223
+				symbol: 'emptyCircle',
224
+				symbolSize: 8,
225
+				itemStyle: {
226
+					normal: {
227
+						color:  'yellow' 
228
+					}
229
+				},
230
+				data: [22, 35, 88, 16, 66, 45, 100, 23, 38, 22,26,33,46,82,66,56,44,52,57,69,38,25,22,12]
225 231
 			}]
226 232
 			
227 233
 		};