在vue中Echarts的使用与总结

本篇文章主要讲我在开发过程中使用到的Echarts使用案例,具体的更多特性可以参考Echarts官网。(注:因为项目机密的原因,本文的代码对敏感内容进行了修改)
Echarts官网:https://echarts.baidu.com/
Echarts是一个开源的数据可视化工具,一个纯Javascript的图表库,用来制图特别方便。
在使用Echarts的时候,都需要导包,在中导入import echarts from ‘echarts’:
在这里插入图片描述

  1. Echarts的折线图
<b-card  title="总设备折线图" class="mb-2">
  <b-table hover show-empty :items="devicehistory.list" :fields="devicehistory.fields" >
</b-table>

然后在vue的 &lt; s c r i p t &gt; &lt; / s c r i p t &gt; &lt;script&gt;&lt;/script&gt; <script></script>中定义devicehistory这个集合变量:

devicehistory: {
          list: [],
          fields: {
              month: {
                  label: '月份',
                  sortable: true,
                  'class': 'text-left'
              },
              totalDevice: {
                  label: '总设备数',
                  sortable: true,
               
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值