Home forums Using CanvasJS CanvasJS chart not rendering properly when using json data returned from php Reply To: CanvasJS chart not rendering properly when using json data returned from php

#14095

Bivek Singh
Moderator

@andy78

JavaScript uses milliseconds as a timestamp, whereas PHP uses Unix timestamp which is in seconds. So, you need to convert PHP timestamp to JS timestamp. You can multiply PHP timestamp by 1000 to get JS timestamp. For further information, you can refer this post on StackOverflow.