Home › Forums › Chart Support › Uncaught TypeError: Cannot read property 'getTime' of undefined › Reply To: Uncaught TypeError: Cannot read property 'getTime' of undefined
@mudassir,
dataPoints is an array of objects. But as per the code shared above, it seems like you are passing a string ("{x: new Date(2017, 10, 20),y: 10},{x: new Date(2017, 10, 17),y: 15}") to dataPoints array instead of objects. Therefore, parsing the data and converting it to objects like {x: new Date(2017, 10, 20),y: 10},{x: new Date(2017, 10, 17),y: 15} should work fine in your case. Here is an example you can refer.
"{x: new Date(2017, 10, 20),y: 10},{x: new Date(2017, 10, 17),y: 15}"
{x: new Date(2017, 10, 20),y: 10},{x: new Date(2017, 10, 17),y: 15}
If this doesn’t suit your requirements, Can you please create a JSFiddle, along with your sample data, reproducing the issue?
___ Suyash Singh Team CanvasJS