Null/undefined return in WordPress AJAX request

I am not sure the output you have provided is the correct one but do you notice the ‘0’ character at the end of your string?

{"title":"R=3+","dates":["06\/04\/2014","11\/05\/2014","15\/06\/2014","27\/07\/2014","17\/08\/2014","28\/09\/2014","05\/10\/2014","19\/10\/2014","09\/11\/2014","23\/11\/2014","14\/12\/2014"],"series":[{"data":[[1396738800000,284],[1399762800000,350],[1402786800000,212],[1406415600000,296],[1408230000000,220],[1411858800000,253],[1412463600000,200],[1413673200000,310],[1415491200000,180],[1416700800000,156],[1418515200000,290]],"name":"Bulls"}]}0

That is enough to cause the JSON parser to fail.

Also, don’t use the contentType property like that since you don’t send any JSON, you should remove that line altogether.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)