import echarts from 'echarts/lib/echarts'; import EchartsReactCore from 'echarts-for-react/lib/core'; // export the Component the echarts Object. export default class EchartsReact extends EchartsReactCore { constructor(props: any) { super(props); (this as any).echartsLib = echarts; } }