Home Forums Chart Support Average of database column Reply To: Average of database column



Pushing the label and y-value into the dataPoints array using this array_push($dataPoints1, array("label" => "PD", "y"=>"$PD1")); approach and passing the encoded array to the dataPoints as dataPoints: <?php echo json_encode($dataPoints2, JSON_NUMERIC_CHECK); ?> should work fine in your case. Please take a look at this updated sample project for the same.

Shashi Ranjan
Team CanvasJS