标签:func main har option dom -- draw prot install
1.安装
npm install echarts --save
main.js
import echarts from ‘echarts‘
Vue.prototype.$echarts = echarts
2.
<div id="chart15" :style="{width: ‘100%‘, height: ‘100%‘}"></div>
methods:{ drawLine() { // 基于准备好的dom,初始化echarts实例 let myChart = this.$echarts.init(document.getElementById("chart15")); // 绘制图表 myChart.setOption({里面就可复制官方文档里的内容}); }, },
mounted() { this.drawLine(); }
标签:func main har option dom -- draw prot install
原文地址:https://www.cnblogs.com/azure-zero/p/13814956.html