Home Forums Chart Support Uncaught TypeError: Cannot read property 'getTime' of undefined Reply To: Uncaught TypeError: Cannot read property 'getTime' of undefined

#24132

@savnur-imran,

As you are also facing a similar issue, you might also be passing a string to dataPoints array instead of an object. In case you are fetching the data from a JSON data source, I would suggest parsing the received to the format accepted by CanvasJS. Please refer to the code snippet below for an example:

dataPoints : [ //array of dataPoint
   {x: new Date(2019, 00, 28), y: 10}, //dataPoint
   {x: new Date(2019, 00, 29), y: 15}  //dataPoint
]

In case you’re still facing the issue, kindly create a JSFiddle reproducing the issue so that we can look into the code and chart-options being used by you, understand the scenario better and help you out?

____
Shashi Ranjan
Team CanvasJS