当前位置: 首页 > Web前端 > vue.js

echarts相关问题

时间:2023-03-31 19:28:47 vue.js

1.当legend各个label长度不同需要对齐时,自定义各个item的样式this.legendData=[{data:[dataList[0].name],left:'20px',formatter:function(name){返回'{a|'+name+'}'},textStyle:{color:'#78A0C2',backgroundColor:"transparent",rich:{a:{width:260}}},icon:'rect',//shapeitemWidth:6,//widthitemHeight:6//height},{data:[dataList[2].name],textStyle:{color:'#78A0C2',backgroundColor:"transparent",width:240},left:'310px',icon:'rect',itemWidth:6,itemHeight:6},{数据:[dataList[1].name],left:'20px',top:'20px',textStyle:{color:'#78A0C2'},icon:'rect',itemWidth:6,itemHeight:6},{数据:[dataList[3].name],left:'310px',top:'20px',textStyle:{color:'#78A0C2'},icon:'rect',itemWidth:6,itemHeight:6}]2,x轴LABLE无法放置,强制显示非间隔axislabel:{//rotate:25,//旋转间隔:0,//强制显示所有LabelTextStyle:{fontsize:12,color:'#78a0c2'}},