1.調整grid下的left屬性,說白了就是調整y軸與左側的距離,大了就能顯示更多的文字
grid:{
top:48,
left:400,// 調整這個屬性
right:50,
bottom:50,
}
這個的缺陷很明顯,文字太多還是不管事 ,而且看起來很別扭
2.通過設置axisLabel下的formatter屬性,實現自定義處理文字,將多出來的用省略號替代
yAxis:{
axisLabel:{
show:true,
formatter:function(value){
var texts=value;
if(texts.length>15){ // 具體多少字就看自己了
texts=texts.substr(0,15)+'...';
}
return texts;
}
}
}
