设置echarts图例的样式以及位置

设置echarts图例的样式以及位置

代码如下:

legend: {
    
    
			type:'scroll', //图例滚动
            orient: 'vertical', //方向
            itemWidth: 10,  // 设置宽度
            itemHeight: 10, // 设置高度
            x:'right',      //可设定图例在左、右、居中
            y:'top',     //可设定图例在上、下、居中
            icon: "rect",//形状  类型包括 circle,rect,line,roundRect,triangle,diamond,pin,arrow,none
            padding:[-5,50,0,0],   //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离]
            data: ['短期订正', '原型预报', '逐步回归', '短期误差订正'],
            textStyle: {
    
    
                //文字样式
                color: "#B4CEFF",
                fontSize: "10"
            }

        },

猜你喜欢

转载自blog.csdn.net/qq_42208679/article/details/104805473