Home forums Using CanvasJS Date Format Reply To: Date Format


Priyanka M S


Convert $row->x to PHP timestamp from string, later converting it to javascript timestamp and assigning that value to dataPoint x-value along with setting xValueType to ‘dateTime’ should work fine in your case. array_push($dataPoints, array(“x”=> strtotime($row->x) * 1000, “y”=> $row->y));

Priyanka M S
Team CanvasJS