option = { //你的代码 backgroundColor: '#081736', tooltip: { trigger: 'axis', backgroundColor: 'rgba(17,95,182,0.5)', textStyle: { color: "#fff" }, axisPointer: { type: 'shadow' } }, grid: { top: '23%', left: '8%', right: '8%', bottom: '13%', containLabel: true }, xAxis: [{ type: 'category', data: ['1', '2', '3', ], axisLine: { show: false, lineStyle: { color: "#063374", width: 1, type: "solid" } }, axisTick: { show: false, }, axisLabel: { show: true, textStyle: { color: 'rgba(255,255,255,0.8)', fontSize: 14 } }, }, { type: 'category', data: ['1', '2', '3', ' ', '4', '5', '6', ' ', '7', '8', '9', ], axisLine: { show: false, lineStyle: { color: "#063374", width: 1, type: "solid" } }, axisTick: { show: false, }, axisLabel: { show: true, textStyle: { color: 'rgba(255,255,255,0.8)', fontSize: 14 } }, },], yAxis: [{ type: 'value', axisLabel: { formatter: '{value}', textStyle: { color: 'rgba(255,255,255,0.8)', fontSize: 14 } }, axisTick: { show: false, }, axisLine: { show: false, lineStyle: { color: "#063374", width: 1, type: "solid" }, }, splitLine: { lineStyle: { color: "#063374", type: "dashed" } }, }], series: [{ xAxisIndex: 1, name: '好', type: 'bar', data: [90, 95, 120, "-", 100, 100, 100, "_", 100, 100, 100], barWidth: 14, //柱子宽度 barGap: 1, //柱子之间间距 itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#00FFB4' }, { offset: 1, color: 'rgba(0, 255, 255, 0.1)', }]), opacity: 1, barBorderRadius: [30, 30, 0, 0], } } }, { xAxisIndex: 1, data: [90, 95, 120, "-", 100, 100, 100, "_", 100, 100, 100], itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#FEC060' }, { offset: 1, color: 'rgba(254, 192, 96, 0.1)' }]), opacity: 1, barBorderRadius: [30, 30, 0, 0], }, }, // false的时候遇到无效值端口,true则忽略 connectNulls: false, name: '用电量', type: 'line', smooth: true, }] };