const xAxisData = ["北京", "上海", "天津", "南京", "深圳","重庆","青岛","大连","沈阳","哈尔滨"] const seriesData = [0, 20, 30, 40, 20, 5, 36, 25, 34, 2] option = { backgroundColor: '#0c2d55', grid: { top: '7%', right: '5%', left: '5%', bottom: '1%', containLabel: true }, tooltip: { show: true, trigger: 'axis', axisPointer: { type: 'line' }, textStyle:{ fontSize:12 }, formatter: '数量:{c}个' }, xAxis: { type: 'category', data: xAxisData, // x轴文字 axisLabel: { 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 } }, yAxis: { type: 'value', // y轴 文字 axisLabel: { textStyle: { fontSize:12 }, }, // y轴 axisLine: { show: false, }, // y轴横向 标线 splitLine: { show: true, lineStyle: { color: 'rgba(255,255,255,0.16)', }, }, }, series: [ { data: seriesData, type: 'line', lineStyle: { color: '#FFD000', }, // 点 itemStyle: { color: '#FFD000' }, // 平滑 属性 smooth: true, symbol: 'emptyCircle', // 区域黄色渐变效果 areaStyle: { normal: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [{ offset: 0, color: 'rgba(255, 214, 62, 0.70)' }, { offset: 1, color: 'rgba(255, 214, 62, 0.10)' } ], false ), shadowColor: 'rgba(255, 214, 62, 0.10)', shadowBlur: 10 } }, }, ] };