echarts饼图legend标识位置
·
echarts图例legend标识位置
方式一:只设置left、right、top、bottom具体像素值或百分比
legend: {
// top: '5%',
left: 'center',
bottom: 30, //具体像素值或百分比
},
方式二:
x : 左(left)、右(right)、居中(center)或具体像素值
y : 上(top)、下(bottom)、居中(center或具体像素值
可使用padding设置距离:padding:[0,0,30,0] (距离上方、右方、下方、左方距离)
legend: {
x:'center',
y:'bottom',
padding:[0,0,30,0],
},
设置标识位置位于底部,两种方式都可以,但是 **不可同时设置**
同理,柱状图中,barWidth(柱宽)和barCategoryGap(同一系列的柱间距离)也不能同时设置
更多推荐
所有评论(0)