1
series: [{
    data: [

        [Date.UTC(2010, 0, 1), 29.9],
        [Date.UTC(2010, 0, 9), 71.5],
         [Date.UTC(2010, 3, 9), 77.5],
         [Date.UTC(2010, 6, 9), 77.5],
         [Date.UTC(2010, 7, 9), 77.5],
         [Date.UTC(2010, 8, 9), 77.5],

     ]

}]

The up onve is the simple series of pie chart its working fine but when i put it inside while loop with $date it does't work like this :

       <?php
      while($row_query=mysqli_fetch_assoc($query_chart)){

  $datetime =$row_query['ptime'];
  $plschart =  $row_query['pls'];

  $data = date('Y, m, d',strtotime($datetime ));



    ?>
        [Date.UTC(<?php echo $date; ?>), <?php echo $plschart;?>],


    <?php  } ?> 

     ]

}]

Note:$date output is like this 2016, 09, 06, if i manually put that date its working fine even with $plschart but with $date its not showing anything so problem is with putting directly $date. Thank in advance.

1
  • Why is data an array of arrays? Also, what has this to do with javascript? Commented Sep 29, 2016 at 8:41

1 Answer 1

1

its Solved, instead of echo $data i echo $date. solved Thanks all

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.