草庐IT

echarts中的legend属性

legend:{orient:"vertical",right:"0%",top:"15%",icon:"circle",//小圆点itemWidth:8,itemHeight:8,itemGap:15,//间隔formatter:function(params){lettip1="";lettip="";letle=params.length;//图例文本的长度if(le>19){//几个字换行大于几就可以了letl=Math.ceil(le/19);//有些不能整除,会有余数,向上取整for(leti=1;i1.图例布局朝向(orient)默认横向布局,纵向布局值为’vertical’or

echarts中的legend属性

legend:{orient:"vertical",right:"0%",top:"15%",icon:"circle",//小圆点itemWidth:8,itemHeight:8,itemGap:15,//间隔formatter:function(params){lettip1="";lettip="";letle=params.length;//图例文本的长度if(le>19){//几个字换行大于几就可以了letl=Math.ceil(le/19);//有些不能整除,会有余数,向上取整for(leti=1;i1.图例布局朝向(orient)默认横向布局,纵向布局值为’vertical’or