前言 当我们的数据类别较多时,用普通的legend会占比较多的空间,所以想设置滚动的legend 普通legend效果图 设置滚动legend效果图 设置滚动legend方法 在setOption中的legend设置type为scroll legend: { type: 'scroll',//过多类型时自适应分页显示 orient: 'horizontal',//方向horizontal水平显示,vertical垂直显示 bottom: 'bottom',//图片底部 left: 'top',左上, right: 'top' 右上, icon: 'circle' }