@@ -20,127 +20,7 @@ export class HomePage {
20
20
}
21
21
22
22
ionViewDidLoad ( ) {
23
- this . storage . get ( AppConfig . TOKEN ) . then ( ( result ) => {
24
- let options = {
25
- color : [ '#3398DB' ] ,
26
- grid : {
27
- left : '3%' ,
28
- right : '4%' ,
29
- bottom : '3%' ,
30
- containLabel : true
31
- } ,
32
- xAxis : [
33
- {
34
- type : 'category' ,
35
- data : [ 'Mon' , 'Tue' , 'Wed' , 'Thu' , 'Fri' , 'Sat' , 'Sun' ] ,
36
- axisTick : {
37
- alignWithLabel : true
38
- }
39
- }
40
- ] ,
41
- yAxis : [
42
- {
43
- type : 'value'
44
- }
45
- ] ,
46
- series : [
47
- {
48
- name : 'Test' ,
49
- type : 'bar' ,
50
- barWidth : '60%' ,
51
- data : [ 10 , 52 , 200 , 334 , 390 , 330 , 220 ]
52
- }
53
- ]
54
- } ;
55
- this . options = options ;
56
-
57
- setTimeout ( ( ) => {
58
- console . log ( '2' ) ;
59
-
60
- options . series [ 0 ] . data = [ 10 , 22 , 30 , 44 , 390 , 330 , 220 ] ;
61
- // this.options = options;
62
- } , 5000 ) ;
63
-
64
-
65
-
66
- let echartOption = {
67
- backgroundColor : '#2c343c' ,
68
-
69
- title : {
70
- text : 'Customized Pie' ,
71
- left : 'center' ,
72
- top : 20 ,
73
- textStyle : {
74
- color : '#ccc'
75
- }
76
- } ,
77
-
78
- tooltip : {
79
- trigger : 'item' ,
80
- formatter : "{a} <br/>{b} : {c} ({d}%)"
81
- } ,
82
-
83
- visualMap : {
84
- show : false ,
85
- min : 80 ,
86
- max : 600 ,
87
- inRange : {
88
- colorLightness : [ 0 , 1 ]
89
- }
90
- } ,
91
- series : [
92
- {
93
- name : '访问来源' ,
94
- type : 'pie' ,
95
- radius : '55%' ,
96
- center : [ '50%' , '50%' ] ,
97
- data : [
98
- { value : 335 , name : '直接访问' } ,
99
- { value : 310 , name : '邮件营销' } ,
100
- { value : 274 , name : '联盟广告' } ,
101
- { value : 235 , name : '视频广告' } ,
102
- { value : 400 , name : '搜索引擎' }
103
- ] . sort ( function ( a , b ) { return a . value - b . value ; } ) ,
104
- roseType : 'radius' ,
105
- label : {
106
- normal : {
107
- textStyle : {
108
- color : 'rgba(255, 255, 255, 0.3)'
109
- }
110
- }
111
- } ,
112
- labelLine : {
113
- normal : {
114
- lineStyle : {
115
- color : 'rgba(255, 255, 255, 0.3)'
116
- } ,
117
- smooth : 0.2 ,
118
- length : 10 ,
119
- length2 : 20
120
- }
121
- } ,
122
- itemStyle : {
123
- normal : {
124
- color : '#c23531' ,
125
- shadowBlur : 200 ,
126
- shadowColor : 'rgba(0, 0, 0, 0.5)'
127
- }
128
- } ,
129
-
130
- animationType : 'scale' ,
131
- animationEasing : 'elasticOut' ,
132
- animationDelay : function ( idx ) {
133
- return Math . random ( ) * 200 ;
134
- }
135
- }
136
- ]
137
- }
138
- this . options = echartOption ;
139
-
140
- } )
141
- console . log ( this . admUserProvider . _admUser ) ;
142
-
143
- console . log ( 'ionViewDidLoad HomePage' ) ;
23
+
144
24
}
145
25
onChartClick ( e ) {
146
26
console . log ( e . dataIndex ) ;
0 commit comments