option = { //你的代码 tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, grid: { left: '12%', // 距离容器左边的距离 right: '12%', // 距离容器右边的距离 top: '10%', // 距离容器顶部的距离 bottom: '0%', // 距离容器底部的距离 containLabel: true, // 包含坐标轴标签在内的所有内容 }, xAxis: { type: 'category', "data": [ "4-1", "4-2", "4-3", "4-4", "4-5", "4-6", "4-7" ], axisLabel: { interval: 0, // 设置为 0,表示强制显示所有标签 rotate: 0, // 设置标签倾斜角度,负数表示逆时针旋转 color: "#A9AEB2"//单位值的颜色 }, axisLine: {show:false}, axisTick: {show:false} }, yAxis: { type: 'value', axisLabel: { show:false, color: '#86909C', fontSize: 12 }, axisLine: {show:false}, axisTick: {show:false}, splitLine: {show:false} }, series: [ { type: 'bar', barWidth: 42, label: { show: true, position: 'top', formatter: '{c}', textStyle: { color: '#86909C', fontSize: 10 } }, itemStyle: { color: { x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: '#165DFF' }, { offset: 1, color: 'rgba(22, 93, 255, 0)' }], } }, data: [7, 11, 8, 3, 5, 9, 5], }, ] };