option = { title: { text: '折线图颜色渐变' }, tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#000' } } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: false }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['周一','周二','周三','周四','周五','周六','周日'] }, yAxis: { type: 'value' }, series: [ { symbol: "none", // 去除点位 name:'邮件营销', type:'line', itemStyle: { normal: { lineStyle: { width: 3, type: 'solid', color: "#ff00ff" //折线的颜色 } } }, areaStyle: {normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ {offset: 0, color: 'red'}, {offset: 0.5, color: 'pink'}, {offset: 1, color: '#fff'} ] ) }}, data: [100, 100, 100, 100, 100, 100, 70], } ] };标签:color,渐变,offset,去除,100,type,ECharts From: https://www.cnblogs.com/wqddmg/p/16595445.html