option = { color: ['#3C6289', '#5B9B8D'], tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' } } }, legend: { data: ['Evaporation', 'Precipitation'], right: '30', top: '20', }, xAxis: [ { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisPointer: { type: 'shadow' } } ], yAxis: [ { type: 'value', name: '单位: %', nameTextStyle: { padding: '30' } }, ], series: [ { name: 'Evaporation', type: 'bar', barWidth: 10, data: [ 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 ], itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: '#2FCAFD', }, { offset: 1, color: '#2450F0', }, ]), barBorderRadius: 10 }, }, { name: 'Precipitation', type: 'bar', barWidth: 10, itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: '#FFE131', }, { offset: 1, color: '#FFB200', }, ]), barBorderRadius: 10, }, data: [ 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 ] }, ] };