sxh24

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代表距离某个位置的距离

posted on 2019-09-24 09:28  xhshen  阅读(30594)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章: