Vue--使用Echare 图表


Vue---Echare 图表 的基本使用

Apache ECharts 一个基于 JavaScript 的开源可视化图表库  
  1. npm install echarts vue-echarts
    npm i -D @vue/composition-api
  2. 在main.js 当中(全局引用)

    import echarts from 'echarts'
    Vue.prototype.$echarts = echarts;

     

  3. 局部页面当中引用

    import * as echarts from 'echarts'

     

  4. 在方法当中完成地下的数据是死的  可以连接api动态化数据


    ?

    ?

    ?
    Echare官网:https://echarts.apache.org/examples/zh/index.html#chart-type-pie

               一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一

vue