echarts修改X,Y軸上的顏色


 分為2.0和3.0

一、2.0

  修改的代碼:

    x軸:

      

xAxis : [
                    {
                        type : 'category',
                        data : ['<30','30-','40-','50-','60-','>=70'],
                        axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#fff'
                            }
                        }
                    }
                ]

 

      y軸:

        

yAxis : [
                    {
                        type : 'value',
                        name : '%',
                        axisLabel : {
                            formatter: '{value}',
                            textStyle: {
                                color: '#fff'
                            }
                        }
                    }
        ]

 

 

      實例地址:http://echarts.baidu.com/echarts2/doc/example/bar5.html  

二、3.0

 

  修改的代碼:

    

axisLabel : { // 坐標軸小標記
                textStyle : { // 屬性lineStyle控制線條樣式
                    fontWeight : 'bolder',
                    color: '#f00',
                    shadowColor : '#f00', // 默認透明
                    shadowBlur : 10,
                    fontSize : 10
                }
            },

 

 

     實例地址: http://echarts.baidu.com/demo.html#bar-negative

 

  

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM