echarts中series中的数据循环显示数据

var dataPhp="{$arr}";
var dataArry=dataPhp.split(';');

var chengname="{$chengname}";
var array=chengname.split(',')
var series=[];

for(var i= 0,d=0;i<array.length,d<dataArry.length;i++,d++){
  series.push({
    name:array[i],
    type:'line',
    data:dataArry[d].split(','),
    symbol:'circle',
    symbolSize:'7',
    smooth:true
  })
}

var option = {

  series:series

}

posted @ 2018-05-09 12:02  苏小白啊  阅读(6440)  评论(0编辑  收藏  举报