import 'echarts/lib/chart/line'; import 'echarts/lib/chart/bar'; import 'echarts/lib/chart/candlestick'; import 'echarts/lib/component/grid'; import 'echarts/lib/component/tooltip'; import 'echarts/lib/component/dataZoom'; import 'echarts/lib/component/visualMap'; import * as exportData from 'echarts/lib/export/core'; import * as echartsData from 'echarts/lib/core/echarts'; interface EchartInterface { [key: string]: any; } const echarts: EchartInterface = {}; Object.keys(echartsData).forEach((key) => { if ( echartsData == null || !Object.prototype.hasOwnProperty.call(echartsData, key) || key === 'default' || key === '__esModule' ) return; echarts[key] = echartsData[key]; }); Object.keys(exportData).forEach((key) => { if ( exportData == null || !Object.prototype.hasOwnProperty.call(exportData, key) || key === 'default' || key === '__esModule' ) return; echarts[key] = exportData[key]; }); export default echarts;