1👍
✅
Maybe could be the version of your Chart.js, here is your code running:
https://jsfiddle.net/6xdvj5u3/
Using this version of Chart.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.bundle.min.js
try to take the PabloMartinez’s recommendation adding a header to your PHP file, before your print line:
header('Content-type: application/json');
print json_encode($data);
Source:stackexchange.com