饼图标签
formatter: function(param){
return param.name +String.fromCharCode("10")
+ param.value +String.fromCharCode("10")
+ param.percent;
},
柱图轴标签
formatter:function(param){
function fixedLengthFormatString(str,num){
if(str == null || str == undefined) return null;
if(!(/^[0-9]*[1-9][0-9]*$/.test(num))) return null;
var array = "";
var len = str.length;
for(var i=0;i<(len/num);i++){
if((i+1)*num < len){
array = array + str.substring(i*num,(i+1)*num) + String.fromCharCode("10");
}else{
array = array + str.substring(i*num);
}
}
return array;
}
return fixedLengthFormatString(param, 5);//五个字符折行
},