结果是在morris.js图表​​中添加一个数字

时间:2018-12-27 15:09:41

标签: javascript php

我在xkey之前添加'19'的结果有问题

这是一张照片 https://1.bp.blogspot.com/-oUEl-TORxUI/XCTp1gEJA5I/AAAAAAAACNE/ipGtuyFnMX4P4zQyJcwVGIrYt7ZAkrepQCLcBGAs/s1600/Sans%2Btitre.png

enter image description here

        $dates =  array($datestatics7[0], $datestatics6[0], $datestatics5[0], $datestatics4[0], $datestatics3[0], $datestatics2[0], $datestatics1[0]) ;
        $datess =  array($date66, $date55, $date44, $date33, $date22, $date11, $date00) ;




        $chart_data = '';
        $datesz = '';

        foreach($dates as $index => $dates2 )
        {
         $chart_data .= "{ day:'".$datess[$index]."', balance:'".$dates2."'}, ";
        }
        $chart_data = substr($chart_data, 0, -2);
<script>
Morris.Line({
 element : 'chart',
 data:[<?php echo $chart_data; ?>],
 xkey:['day'],
 ykeys:['balance'],
 labels:['balance'],
 hideHover:'auto',
 stacked:true
});
</script>

0 个答案:

没有答案