option = { backgroundColor: '#0c2d55', legend: { top: '0%', right: '0%', itemWidth: 20, itemHeight: 8, itemStyle: { color: '#18A4FF', }, textStyle: { color: '#5C5A5A', fontSize: 13, }, }, grid: { top: '20%', left: '5%', bottom: '15%', right: '5%', }, tooltip: { show: true, trigger: 'axis', axisPointer: { type: 'line' }, textStyle: { fontSize: 12 }, formatter: (params) => { return params.value + '\n' + '(' + params.percent + '%)'; }, }, xAxis: { type: 'category', boundaryGap: false, // x轴文字 axisLabel: { align: 'left', inside: true, textStyle: { color: "rgba(255,255,255,0.6)", fontSize: 12 }, }, // x轴 axisLine: { show: true, lineStyle: { width: 2, color: 'rgba(255,255,255,0.6)', }, }, // x轴刻度 axisTick: { show: false }, data: [ '2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04', ], }, yAxis: { axisLabel: { show: false }, // y轴 axisLine: { show: false, }, // y轴横向 标线 splitLine: { show: true, lineStyle: { color: 'rgba(255,255,255,0.16)', }, }, }, series: [ { name: '企业总值', data: [20, 30, 40, 20, 36, 25], type: 'line', lineStyle: { width: 4, color: '#47B47C', }, smooth: true, showSymbol: false, // 区域黄色渐变效果 areaStyle: { normal: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [{ offset: 0, color: 'rgba(71, 180, 124, 0.70)' }, { offset: 1, color: 'rgba(71, 180, 124, 0)' } ], false ), shadowColor: 'rgba(255, 214, 62, 0.10)', shadowBlur: 10 } }, }, { name: '企业总值', data: [20, 36, 20, 36, 25, 34], type: 'line', lineStyle: { width: 4, type: 'dashed', color: '#FF9300', }, smooth: true, showSymbol: false, }, ] };