需要在xAxis里面加上rotation属性,该值有以下特点
rotation == 90 完全竖着放
rotation < 90 值向右倾斜着放
rotation > 90 值向左倾斜着放
xAxis: {
categories : [ '哈哈哈哈' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' ] ,labels : {
rotation: 80,
fontStyle : 'italic' //实现字体斜放,关于合成词属性的书写,第二个单词的首字母需要大写,中间没有连字符-
}},
值为100,效果如图:
值为90,效果如图:
值为80, 效果如图: