只需要 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 代表距离某个位置的距离
来源: http://www.bubuko.com/infodetail-3210834.html