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