You must be logged in to post your query.
Home › Forums › Chart Support › Populate Chart datapoints with data from database
Tagged: For Loop, JSON, php
I’m trying to populate the chart datapoints with data from database using PHP and Json.
var exam_grades1 = <?php echo json_encode($exam_grades1 );?>; for(var key in exam_grades1) { var value = exam_grades1[key]; }
Then I wanna be able to do something like this:
... dataPoints: [ { label: key, y: parseFloat(value) }, ....
Any help will be greatly appreciated.
You must be logged in to reply to this topic. Login/Register