@@ -145,20 +145,24 @@ export default (FC, ...options) => {
145145 deep : true
146146 } ,
147147 '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+ }
153155 } ,
154156 deep : false
155157 } ,
156158 '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+ }
162166 } ,
163167 deep : false
164168 }
@@ -182,6 +186,7 @@ export default (FC, ...options) => {
182186 cloneDataSource ( ds , 'diff' )
183187 ) ;
184188 if ( strPrevClonedDataSource !== strCurrClonedDataSource ) {
189+ this . prevDataSource = cloneDataSource ( ds , 'diff' ) ;
185190 this . chartObj . setChartData ( ds , this . dataFormat || this . dataformat ) ;
186191 }
187192 }
0 commit comments