在jQuery里面,实现一个折线图,【前端统计图】echarts实现单条折线图
https://www.jianshu.com/p/0354a4f8c563。
现在要实现,Vue+Echarts实现一个折线图,打开之前的mint项目:
1:在项目里面安装echarts
cnpm install echarts --s
2:在需要用图表的地方引入
import echarts from 'echarts'
3:打开my.vue
继续写代码,代码如下:
<template>
<!--为echarts准备一个具备大小的容器dom-->
<div id="main" style="width: 600px;height: 400px;"></div>
</template>
<script>