Accepted answer

Instead of passing a .php file as a parameter to d3.json() try passing a .json file:

d3.json("chart_data.json", function(error, data){
    json_Data = data;

Use php to get the code from the DB and convert it to json using something like json_encode. Output that data in a .json file. Don't try to read json directly from a .php file.

Related Query

More Query from same tag