echarts更改yAxis样式


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

  

 

 

 

 

 返回的格式: 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM