option = { backgroundColor: "rgba(0,0,0,0)", grid: { top: '20%', left: '4%', bottom: '0%', right: '5%', containLabel: true, }, barWidth: 12, xAxis: { type: 'value', splitLine: { show: false, lineStyle: { color: "#444142", type: 'dashed' } }, axisTick: { show: true, }, axisLine: { // 改变x轴颜色 show:true, lineStyle: { color: "#EEEDEF" } }, axisLabel: { // 改变x轴字体颜色和大小 show: true, textStyle: { color: "#A4A3A4", fontSize: 12 } } }, yAxis: { type: 'category', data: ['推荐', '不良行为记录', '惩戒', '黑名单'], splitLine: { show:true, lineStyle: { color: "rgba(255,255,255,0.2)", fontSize: 14, type: 'dashed' } }, axisTick: { show: false }, axisLine: { // 改变y轴颜色 show:false }, axisLabel: { // 改变y轴字体颜色和大小 //formatter: '{value} m³ ', // 给y轴添加单位 textStyle: { color: "#444142", fontSize: 16 } } }, series: [{ type: 'bar', name: "", barWidth : 12, itemStyle: { normal: { label: { show: true, //开启显示 position:"right", //在上方显示 textStyle: { //数值样式 color: "#2481D7", fontSize: 14, fontWeight: 600 } }, color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ offset: 0, color: '#1890FF' }, { offset: 1, color: '#FFFFFF' }]), // barBorderRadius:15 } }, data: [160, 200, 140, 200] } ] }