效果如图
方法:
在formatter函数中,利用空格进行占位的操作
xAxis: {
axisLabel:{
showMaxLabel:true, // 展示最大值
showMinLabel:true, // 展示最小值
formatter: function(value,index){
if(index === 0) {
return ' ' + value;
}
if(index === data.length -1) {
return value + ' ';
}
return value;
}
}
}
如有其他方法,欢迎指教