Home Forums Chart Support Populate Chart datapoints with data from database

Populate Chart datapoints with data from database

Viewing 1 post (of 1 total)
  • #7864

    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.

    • This topic was modified 9 years, 2 months ago by mikespider.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.