yAxis: {
type: 'category',
inverse: true,
data: arr,
axisLabel: {
formatter: function (value,index) {
console.log(value,'ff')
// 判断一个刻度值知否为一年的开始
return '{year|' + value + '}
'
+ '{month|' + stationNum[index] + '月}';
},
rich: {
year: {
color: 'red',
fontSize:'18',
fontWeight: 'bold',
backgroundColor:'green',
100,
height:20,
position:'absolute',
top:321321
},
month: {
color: '#999',
backgroundColor:'green',
100,
height:20,
}
}
}
},

返回的格式: 