window.onresize = this.trendChart.resize
methods: {
initCharts() {
this.trendChart = echarts.init(this.$refs.trendChart)
this.setOptions()
window.onresize = this.trendChart.resize
},
setOptions() {
this.trendChart.setOption({
backgroundColor: '#fff',
tooltip: {
trigger: 'axis',
show: true,
},
legend: {
show: true,
icon: 'circle',
bottom: 5,
textStyle: {
fontSize: 14,
color: '#c8c8c8',
},
},
grid: {
left: '5%',
right: '5%',
top: '15%',
bottom: '15%',
containLabel: true,
},
xAxis: {
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
},
data: this.chartsTime,
},
yAxis: {
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
series: this.chartsData,
})
},
},