赞
踩
vue+Element UI项目中数据分析功能需要用到圆环图 折线图 饼图 柱状图等,可视化图形分析
npm install echarts --save
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
import * as echarts from 'echarts'
<div id="myChartjw" :style="{ width: '366px', height: '30px' }"></div>
mounted(){
this.progressBar()
},
progressBar() {
var chartDom4 = document.getElementById("myChartjw");
var myChart4 = echarts.init(chartDom4);
var option = {
title: {
text: 'ECharts 入门示例'
},
tooltip: {},
legend: {
data: ['销量']
},
xAxis: {
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
},
yAxis: {},
series: [
{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}
]
};
option && myChart4.setOption(option);
},
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。