美文网首页
echart使用

echart使用

作者: Jony0114 | 来源:发表于2019-07-26 17:53 被阅读0次

1.首先npm install echarts --save

2.在需要用到的地方引入模块import echarts from 'echarts'

3.定义一个容器<div ref="chartAllData" style="height:240px;width:100%;text-align:center;"></div>

4.在js逻辑中加载:

this.initComponent()

this.chartAllData = echarts.init(this.$refs.chartAllData)

this.chartAllData.setOption({

})

相关文章

网友评论

      本文标题:echart使用

      本文链接:https://www.haomeiwen.com/subject/ctocxctx.html