echarts屏幕大小改变适配
//创建Echarts时存放的对象
window.addEventListener('resize', () => {
this.right_echarts.resize()
})
echarts数据更新
//通过创建时存储的echarts对象获取option配置
const option = this.left_echarts.getOption()
//设置配置项数据
//this.echarts_data:存放的要修改数据
option.legend[0].data = this.echarts_data.type
option.xAxis[0].data = this.echarts_data.date
option.series = this.echarts_data.data
//将修改后的数据进行渲染
this.left_echarts.setOption(option) // 更新图表
echarts渐变颜色生成
new echarts.graphic.LinearGradient(0,1,0,0,
[{ offset: 0, color: '#ece1a9' },
{ offset: 1, color: '#FFDA12' }]
,false)
360





