Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

d3.js get JSON from url

The situation is that i am trying to get d3 to read a JSON file which is stored in Windows Azure Blob storage. If i paste the url into a browser then the file is downloaded to my machine. I would like to be able get the JSON file from the url with d3, but no graph is produced which leads me to believe that the d3 is unable to read the file.

Here is a snippet of the code:

            var url = "http://storageName.blob.core.windows.net/containerName/file.json";

            d3.json("url", function (json) {

             //code here
            })

I have set the container to public on Azure, so i believe that it should be accessible to anyone with the url. Any suggestions?

like image 749
Cathal Avatar asked Nov 28 '22 15:11

Cathal


1 Answers

Should be:

var url = "http://storageName.blob.core.windows.net/containerName/file.json";
d3.json(url, function (json) {
    //code here
});
like image 90
YingDynasty Avatar answered Dec 06 '22 02:12

YingDynasty