css
xAxis: {
type: "category",
boundaryGap: false,
data: interfaceName,
axisLabel: { //坐标轴刻度标签的相关设置。
interval: 0,
margin: 12,
textStyle: { // 更改x轴文字颜色的配置
color: "#99B4D9", //处理x轴的文字颜色
fontSize: 12,
},
formatter: function (value) {
let result = "";
let maxLength = 4; // 每行最多显示4个字符
for ( let i = 0, len = value.length; i < len; i += maxLength ) {
result += value.slice(i, i + maxLength) + "\n";
}
return result;
},
},
axisLine: {
lineStyle: {
color: "#199DFF",
width: 1, //x轴线的宽度
},
},
axisTick: {
show: false,
},
},