欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

Highcharts 怎么给data:赋值

程序员文章站 2024-02-06 13:36:04
...




图表展示










Highcharts 怎么给data:赋值






回复讨论(解决方案)

$data = '2,3,4,5,6,7,8,9,10';


data: []


这样不就行了?

大哥它里面是不解析的

看你是ajax返回?还是直接echo?

ajax试过没成功,我就直接把他发送到页面了 $shu = '';
$data = array();//今日交易额
$a = '';
for($i=0;$i $shu = $today+$i*7200;
$re = $num->where("`time_end` > $today and `time_end` select();
for($m=0;$m $a += $re[$m]['total_fee']/100;
}
//var_dump($re);exit;
//echo $num->getlastsql();
$data[] =$a;
}

//var_dump($data);//exit;
$shu1 = '';
$b = '';
$data1 = array();//昨日交易额
for($j=0;$j $shu1 = $yesterday+$j*7200;
$re1 = $num->where("`time_end` > $yesterday and `time_end` select();
for($n=0;$n $b += $re1[$n]['total_fee']/100;
}
$data1[] =$b;
}

$data = implode(',',$data);
//$data = json_encode($data);
$data1 = implode(',',$data1);
//$data1 = json_encode($data1);
// var_dump($data);
// var_dump($data1);exit;
$this->assign('data',$data);
$this->assign('data1',$data1);
$this->display();