=0) $tmp2.="{name:'".$arrx[$j-1]."',value:".$arr2[$j]."},"; } $str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."',data:[".substr($tmp2,0,-1)."]},"; }else if($t=="line"){ if($arr2[0]) $str_legend.="\"".$arr2[0]."\","; $tmp2=" "; for($j=1;$j=0) $tmp2.=$arr2[$j].","; } $str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."', yAxisIndex: ".$i.",data:[".substr($tmp2,0,-1)."]},"; }else{ if($arr2[0]) $str_legend.="\"".$arr2[0]."\","; $tmp2=" "; for($j=1;$j=0) $tmp2.=$arr2[$j].","; } $str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."',data:[".substr($tmp2,0,-1)."]},"; } } } if($str_data_y) $str_data_y=substr($str_data_y,0,-1); if($str_legend) $str_legend=substr($str_legend,0,-1); //处理data_x for($i=0;$i echart图表