@@ -145,20 +145,24 @@ export default (FC, ...options) => {
145
145
deep : true
146
146
} ,
147
147
'datasource.data' : {
148
- handler : function ( ) {
149
- this . chartObj . setChartData (
150
- this . datasource || this . dataSource ,
151
- this . dataFormat || this . dataformat
152
- ) ;
148
+ handler : function ( newVal , prevVal ) {
149
+ if ( newVal !== prevVal ) {
150
+ this . chartObj . setChartData (
151
+ this . datasource || this . dataSource ,
152
+ this . dataFormat || this . dataformat
153
+ ) ;
154
+ }
153
155
} ,
154
156
deep : false
155
157
} ,
156
158
'dataSource.data' : {
157
- handler : function ( ) {
158
- this . chartObj . setChartData (
159
- this . datasource || this . dataSource ,
160
- this . dataFormat || this . dataformat
161
- ) ;
159
+ handler : function ( newVal , prevVal ) {
160
+ if ( newVal !== prevVal ) {
161
+ this . chartObj . setChartData (
162
+ this . datasource || this . dataSource ,
163
+ this . dataFormat || this . dataformat
164
+ ) ;
165
+ }
162
166
} ,
163
167
deep : false
164
168
}
@@ -182,6 +186,7 @@ export default (FC, ...options) => {
182
186
cloneDataSource ( ds , 'diff' )
183
187
) ;
184
188
if ( strPrevClonedDataSource !== strCurrClonedDataSource ) {
189
+ this . prevDataSource = cloneDataSource ( ds , 'diff' ) ;
185
190
this . chartObj . setChartData ( ds , this . dataFormat || this . dataformat ) ;
186
191
}
187
192
}
0 commit comments