在X轴配置项内加入rotate属性,比如rotate:-15, // 倾斜-15度
xAxis: [
{
type: "category",
axisLabel: {
rotate:-15, // 倾斜30度<<<<<-----复制这里----------
interval: 0,
textStyle: {
color: "#FFF",
fontSize: "12",
},
},
offset: 6,
boundaryGap: true,
splitLine: {
show: false,
},
data: cate,
axisLine: {
show: true,
},
axisTick: {
show: false,
},
},
],