[mod]修改echarts组件

init
CUIYUWEI 4 years ago
parent 0f69d46ec5
commit 25011415de

@ -67,8 +67,10 @@
},
methods: {
drawLine(id) {
drawLine() {
this.charts = echarts.init(this.$refs.bar_dv);
this.autoHeight = this.legendData.length* 35 + 50; // counst.length3550x()
this.charts.resize({height:this.autoHeight});
let xAxis={};
let yAxis={};
if(this.isType==="across"){
@ -96,12 +98,14 @@
xAxis: xAxis,
yAxis: yAxis,
grid: {
left: '15',
right: '40',
bottom: '30',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
legend: {
x:'center',
y:'bottom',
data: this.legendData
},
series: this.seriesData,
@ -113,11 +117,13 @@
backgroundColor: '#6a7985'
}
}
}
},
});
},
},
mounted() {
this.$nextTick(function() {
this.drawLine('barChart')
})

Loading…
Cancel
Save