option = { title: { // text: '热源实时流量', textStyle: { align: 'center', color: '#fff', fontSize: 20, }, top: '3%', left: '10%', }, backgroundColor: '#0B1346', grid: { top: "25%", bottom: "10%"//也可设置left和right设置距离来控制图表的大小 }, tooltip: { trigger: "axis", axisPointer: { type: "shadow", label: { show: false, //X轴的 } } }, legend: { data: ["计划", "完成"], top: "15%", textStyle: { color: "#ffffff" } }, xAxis: { data: [ "C15喷射", "C25组", "C36水泵送", "C85补偿收缩" ], axisLine: { show: true, //隐藏X轴轴线 lineStyle: { color: '#30538A' } }, axisTick: { show: true //隐藏X轴刻度 }, axisLabel: { show: true, textStyle: { color: "#BADBFB" //X轴文字颜色 } }, }, yAxis: [ { type: "value", name: "m³", nameTextStyle: { color: "#BADBFB", fontSize:15 }, splitLine: { show: false }, axisTick: { show: true }, axisLine: { show: true, lineStyle: { color: '#30538A' } }, axisLabel: { show: true, textStyle: { color: "#BADBFB" } }, }, { type: "value", gridIndex: 0, min: 50, max: 100, splitNumber: 8, splitLine: { show: false }, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, splitArea: { show: true, areaStyle: { color: ["#172862", "#101B51"] } } } ], series: [{ name: "计划", type: "bar", // yAxisIndex: 1, // barGap:'100%', barWidth: 15,//使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用 smooth: true, //平滑曲线显示 showAllSymbol: true, //显示所有图形。 symbol: "circle", //标记的图形为实心圆 // color: '#FF8247', itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#A0C2F6", }, { offset: 0.5, color: "#7DABF7" }, { offset: 1, color: "#6397F7" } ]), }, }, data: [4, 5.8,5,9] }, { name: "完成", type: "bar", barWidth: 15, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#FAF2BC", }, { offset: 0.5, color: "#F8EB97" }, { offset: 1, color: "#F5E46C" } ]), }, }, data: [4.2, 3.8,5.3,6.8] } ] };