ngx-echarts的使用

ngx-echarts相关网址

  1. ngx-echarts地址
  2. echarts4.0+百度官网
  3. ngx-echarts github地址

安装 v2.2.0版本

  • v3.1.0 for Angular >= 6

  • v2.2.0 for Angular < 6

    目前,我们使用的是angular5,因此我们安装ngx-echarts@2.2.0,echarts版本选择4.1.0。

npm install echarts@4.1.0 --save
npm install ngx-echarts@2.2.0 --save
复制代码

引入

  1. 在angular-cli.json中引入echarts

     {
          "name": "ebiz-workspace",
          "root": "apps/ebiz-workspace/src",
          "outDir": "dist/apps/ebiz-workspace",
    		...
          "scripts": [
            "../../../node_modules/echarts/dist/echarts.min.js"
          ],
         	...
        },
    复制代码
  2. 在module中引入

    import { NgxEchartsModule } from 'ngx-echarts';
    @NgModule({
      imports: [
      ...
        NgxEchartsModule,
        ...
      ]
      ...
      })
    复制代码

转载于:https://juejin.im/post/5b751387f265da27fe3f2a07

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值