Home › Forums › Chart Support › x-axis date from php not working › Reply To: x-axis date from php not working
@sona2017,
In JavaScript, Date instance is created using new Date().
new Date()
In your case, changing $x_axis = date(‘D M d Y H:i:s O’, strtotime($csv[$i][0])); to $x_axis = new Date(‘D M d Y H:i:s O’, strtotime($csv[$i][0])); should work fine.
$x_axis = date(‘D M d Y H:i:s O’, strtotime($csv[$i][0]));
$x_axis = new Date(‘D M d Y H:i:s O’, strtotime($csv[$i][0]));
— Vishwas R