1
1
const { optionsMap, props } = require ( './config.js' ) ;
2
- const _ = require ( 'lodash' ) ;
2
+ const cloneDeep = require ( 'lodash/cloneDeep ' ) ;
3
3
import { addDep , checkIfDataTableExists , cloneDataSource } from './utils' ;
4
4
5
5
export default ( FC , ...options ) => {
@@ -149,7 +149,7 @@ export default (FC, ...options) => {
149
149
if ( newVal !== prevVal ) {
150
150
let clonedDataSource ;
151
151
if ( this . datasource . series ) {
152
- clonedDataSource = _ . cloneDeep ( this . datasource ) ;
152
+ clonedDataSource = cloneDeep ( this . datasource ) ;
153
153
} else clonedDataSource = this . datasource ;
154
154
this . chartObj . setChartData (
155
155
clonedDataSource ,
@@ -164,7 +164,7 @@ export default (FC, ...options) => {
164
164
if ( newVal !== prevVal ) {
165
165
let clonedDataSource ;
166
166
if ( this . dataSource . series ) {
167
- clonedDataSource = _ . cloneDeep ( this . dataSource ) ;
167
+ clonedDataSource = cloneDeep ( this . dataSource ) ;
168
168
} else clonedDataSource = this . dataSource ;
169
169
this . chartObj . setChartData (
170
170
clonedDataSource ,
@@ -196,7 +196,7 @@ export default (FC, ...options) => {
196
196
if ( strPrevClonedDataSource !== strCurrClonedDataSource ) {
197
197
this . prevDataSource = cloneDataSource ( ds , 'diff' ) ;
198
198
if ( ds . series ) {
199
- ds = _ . cloneDeep ( ds ) ;
199
+ ds = cloneDeep ( ds ) ;
200
200
}
201
201
this . chartObj . setChartData ( ds , this . dataFormat || this . dataformat ) ;
202
202
}
0 commit comments