Vue 使用Echarts

在vue中使用echarts有两种方法
一、安装并全局引入
1、通过npm获取echarts
npm install echarts --save

2、在 main.js 中添加下面两行代码

import * as echarts from 'echarts'

Vue.prototype.$echarts = echarts //挂载到Vue实例上面

二、使用  https://echarts.apache.org/examples/zh/index.html#chart-type-pie




你可能感兴趣的:(VUE,vue,echarts)