option = { backgroundColor: '#000', color: ['#45F19E', '#1ED6FF','#268AFF'], tooltip: { trigger: 'axis', backgroundColor: '#4B4F52', borderColor: '#4B4F52', padding: 8, textStyle: { color: '#fff', } }, legend: { data: ['数据1', '数据2','数据3'], icon: 'rect', itemWidth: 14, itemHeight: 14, bottom:20, right: 15, textStyle: { fontSize: 14, color: '#737A85' } }, grid: { left: '3%', right: '4%', bottom: '10%', top:'10%', containLabel: true }, xAxis: { type: 'category', axisLine: { // 轴线设置 show: false, // 显示轴线 }, axisLabel: { textStyle: { color: '#737A85', //更改坐标轴文字颜色 fontSize: 12 //更改坐标轴文字大小 } }, data: ['2022.01', '2022.02', '2022.03', '2022.04', '2022.05', '2022.06', '2022.07', '2022.08'] }, yAxis: { splitLine: { show: true, lineStyle: { color: '#737A85', type:'dashed' }, }, axisLabel: { textStyle: { color: '#737A85', //更改坐标轴文字颜色 fontSize: 12 //更改坐标轴文字大小 } }, }, series: [ { name: '数据1', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 15, itemStyle: { shadowColor: '#fff', shadowBlur: 10 }, // label: { // show: true, // position: 'right', // color: '#fff' // }, areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'RGBA(69, 241, 158, 0.6)' }, { offset: 1, color: 'RGBA(69, 241, 158, 0)' } ]) }, emphasis: { focus: 'series' }, data: [3, 4, 5,1, 2, 6,7, 8] }, { name: '数据2', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 15, itemStyle: { shadowColor: '#fff', shadowBlur: 10 }, // label: { // show: true, // position: 'right', // color: '#fff' // }, areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'RGBA(30, 214, 255, 0.6)' }, { offset: 1, color: 'RGBA(30, 214, 255, 0)' } ]) }, emphasis: { focus: 'series' }, data: [6, 8, 10,2, 4, 16,17, 18] }, { name: '数据3', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 15, itemStyle: { shadowColor: '#fff', shadowBlur: 10 }, // label: { // show: true, // position: 'right', // color: '#fff' // }, areaStyle: { opacity: 0.8, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: 'RGBA(38, 138, 255, 0.6)' }, { offset: 1, color: 'RGBA(38, 138, 255, 0)' } ]) }, emphasis: { focus: 'series' }, data: [16, 18, 20,12, 14, 26,27, 28] }, ] };