echarts改變圖例位置


只需要legend屬性中修改如下幾個示數即可:

  legend:{

       orient:"horizontal",

       x:'right',

       y:' center',

       width:'100',

       padding:[10, 30,0 0],

       itemWidth:30,

       textStyle:{

            color:'#000',

          },

}

 

x : 左(left)、右(right)、居中(center)
y : 上(top)、下(bottom)、居中(center)

padding:[0,30,0,0] [(上),(右)、(下)、(左)]

注意:x、y代表圖例的位置,padding代表距離某個位置的距離


免責聲明!

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



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