@@ -21,28 +21,28 @@ export default {
21
21
default : 'auto'
22
22
}
23
23
} ,
24
- data ( ) {
24
+ data ( ) {
25
25
return {
26
26
chart : null
27
27
}
28
28
} ,
29
- mounted ( ) {
29
+ mounted ( ) {
30
30
this . init ( )
31
31
} ,
32
32
created ( ) {
33
33
this . $watch ( 'options' , options => {
34
34
if ( ! this . chart && options ) {
35
35
this . init ( )
36
36
} else {
37
- this . chart . updateOptions ( this . options ) ;
37
+ this . chart . updateOptions ( this . options )
38
38
}
39
39
} )
40
40
41
41
this . $watch ( 'series' , series => {
42
42
if ( ! this . chart && series ) {
43
43
this . init ( )
44
44
} else {
45
- this . chart . updateSeries ( this . series ) ;
45
+ this . chart . updateSeries ( this . series )
46
46
}
47
47
} , { deep : true } )
48
48
@@ -53,17 +53,17 @@ export default {
53
53
} )
54
54
} )
55
55
} ,
56
- beforeDestroy ( ) {
56
+ beforeDestroy ( ) {
57
57
if ( ! this . chart ) {
58
58
return
59
59
}
60
60
this . destroy ( )
61
61
} ,
62
- render ( createElement ) {
63
- return createElement ( 'div' ) ;
64
- } ,
62
+ render ( createElement ) {
63
+ return createElement ( 'div' )
64
+ } ,
65
65
methods : {
66
- init ( ) {
66
+ init ( ) {
67
67
const newOptions = {
68
68
chart : {
69
69
type : this . type ,
@@ -73,45 +73,45 @@ export default {
73
73
series : this . series
74
74
}
75
75
76
- const config = ApexCharts . merge ( this . options , newOptions ) ;
76
+ const config = ApexCharts . merge ( this . options , newOptions )
77
77
this . chart = new ApexCharts ( this . $el , config )
78
78
this . chart . render ( )
79
79
} ,
80
- refresh ( ) {
80
+ refresh ( ) {
81
81
this . destroy ( )
82
82
this . init ( )
83
83
} ,
84
- destroy ( ) {
84
+ destroy ( ) {
85
85
this . chart . destroy ( )
86
86
} ,
87
- updateSeries ( newSeries , animate ) {
87
+ updateSeries ( newSeries , animate ) {
88
88
this . chart . updateSeries ( newSeries , animate )
89
89
} ,
90
- updateOptions ( newOptions , redrawPaths , animate ) {
90
+ updateOptions ( newOptions , redrawPaths , animate ) {
91
91
this . chart . updateOptions ( newOptions , redrawPaths , animate )
92
92
} ,
93
- toggleSeries ( seriesName ) {
93
+ toggleSeries ( seriesName ) {
94
94
this . chart . toggleSeries ( seriesName )
95
95
} ,
96
- appendData ( newData ) {
96
+ appendData ( newData ) {
97
97
this . chart . appendData ( newData )
98
98
} ,
99
- addText ( options ) {
99
+ addText ( options ) {
100
100
this . chart . addText ( options )
101
101
} ,
102
- dataURI ( ) {
103
- return this . chart . dataURI ( ) ;
102
+ dataURI ( ) {
103
+ return this . chart . dataURI ( )
104
104
} ,
105
- addXaxisAnnotation ( options , pushToMemory ) {
105
+ addXaxisAnnotation ( options , pushToMemory ) {
106
106
this . chart . addXaxisAnnotation ( options , pushToMemory )
107
107
} ,
108
- addYaxisAnnotation ( options , pushToMemory ) {
108
+ addYaxisAnnotation ( options , pushToMemory ) {
109
109
this . chart . addYaxisAnnotation ( options , pushToMemory )
110
110
} ,
111
- addPointAnnotation ( options , pushToMemory ) {
111
+ addPointAnnotation ( options , pushToMemory ) {
112
112
this . chart . addPointAnnotation ( options , pushToMemory )
113
113
} ,
114
- clearAnnotations ( ) {
114
+ clearAnnotations ( ) {
115
115
this . chart . clearAnnotations ( )
116
116
}
117
117
}
0 commit comments