Closed Karine-GitHub closed 7 years ago
同样遇到 echarts is not defined 问题 我使用的是angular-cli,angular-cli.json里确定是加入了echarts,尝试直接在index.html引入echarts.js,还是一样。 版本信息 angular-cli: 1.4.3 angular: 4.4.3
Please try to remove node_modules and do npm install again.
@xieziyu I try to implement ngx-echarts in a simple sample project and it works fine. The issue comes from my final project (webpack old version or configuration, I don't know exactly).
Hello,
I have the following error when I try to display a pie chart :
I followed these steps for install:
add npm packages in package.json
include this lines in my webpack.common.js file :
plugins: [ new webpack.ProvidePlugin({ echarts: "echarts" }) ]
include this line in my shared module:
import { AngularEchartsModule } from 'ngx-echarts';
call in my shared component:
<div echarts [options]="chartOption"></div>
I'm using angular 4.2.6
Thanks in advance