option = { tooltip: { trigger: "axis", backgroundColor: "rgba(0,0,0,.6)", borderColor: "rgba(147, 235, 248, 0)", textStyle: { color: "#FFF", }, }, grid: { left: "10%", top: "30%", right: "5%", bottom: "10%", }, xAxis: { boundaryGap: false, axisLine: { //坐标轴轴线相关设置。数学上的x轴 show: true, lineStyle: { color: '#10646D' }, }, axisLabel: { //坐标轴刻度标签的相关设置 textStyle: { color: '#10646D' }, }, axisTick: { show: false }, data: ['6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7'] }, yAxis: [{ name: '单位:(元/斤)', nameTextStyle: { color: '#10646D', }, type: 'value', splitNumber: 7, splitLine: { show: true, lineStyle: { type: 'dashed', color: 'rgba(16, 100, 109, 0.2)' } }, axisLine: {show: false,}, axisLabel: { margin:20, textStyle: { color: '#10646D', }, }, axisTick: { show: false,}, }], series: [ { name: "权重", type: "bar", barWidth: 10, itemStyle: { color: { type: 'linear', x: 0, //右 y: 0, //下 x2: 0, //左 y2: 1, //上 colorStops: [ { offset: 0.1, color: 'rgba(0, 126, 178, 1)' // 0% 处的颜色 }, { offset: 1, color: 'rgba(0, 126, 178, 0)' // 100% 处的颜色 } ] }, barBorderRadius: [10, 10, 0, 0], }, label: { show: false, position: "top", distance: 0, color: "#1ACDDC", formatter: "{c}" + "次", }, data: [0.0143230513342864, 0.00712355721281654, 0.00640036249364493, 0.00630499703049568, 0.00609293037165079, 0.00526289934453259, 0.00511598466738863, 0.00495456943702402, 0.00474703072844757, 0.00459026733191873, 0.0043661709889541], }, { name: "权重", type: "bar", barWidth: 10, itemStyle: { color: { type: 'linear', x: 0, //右 y: 0, //下 x2: 0, //左 y2: 1, //上 colorStops: [ { offset: 0.1, color: 'rgba(53, 209, 225, 1)' // 0% 处的颜色 }, { offset: 1, color: 'rgba(53, 209, 225, 0)' // 100% 处的颜色 } ] }, barBorderRadius: [10, 10, 0, 0], }, label: { show: false, position: "top", distance: 0, color: "#1ACDDC", formatter: "{c}" + "次", }, data: [0.0143230513342864, 0.00712355721281654, 0.00640036249364493, 0.00630499703049568, 0.00609293037165079, 0.00526289934453259, 0.00511598466738863, 0.00495456943702402, 0.00474703072844757, 0.00459026733191873, 0.0043661709889541] } ], };