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