I just downloaded d3 on my mac and started exploring the examples inside the folder by opening them in firefox. Most of them are working fine except bundle maps. Could any one please help me what is going on ?
Asked
Active
Viewed 228 times
0
-
What error do you get? What have you tried? – KatieK Dec 06 '12 at 20:00
-
there is no error. just a blank page. I checked whether I am missing any packages but no. I checked the html and js files of bundlemap. Surprisingly it doesn't have any links of data that used to draw the map. – ferrelwill Dec 06 '12 at 20:10
2 Answers
0
I had this problem when I didn't simulate a web server on my machine where I put the code (like MAMP or XAMP). Try using MAMP and put the code in the htdocs folder.

cruxi
- 819
- 12
- 28
0
If you're referring to this example, it uses XHR to get the JSON data to generate the graph, and that would result in an error due to attempting to access a local resource on your machine.

Zikes
- 5,888
- 1
- 30
- 44
-
XHR is XMLHttpRequest, it's the built-in browser technology used to fetch information not on the page. By default the browser prevents pages from using it to access files stored locally on a machine, for security reasons. – Zikes Dec 06 '12 at 22:43
-
It looks very complex to enable what u suggested https://developer.mozilla.org/en-US/docs/HTTP_access_control – ferrelwill Dec 06 '12 at 22:46
-
It's probably easiest to put them behind a local web server, as @cruxi suggested above. Once you've fired up XAMP or MAMP and put the files in the correct location make sure you're using `http://localhost/path/to/my/file` to access the chart. – Zikes Dec 06 '12 at 22:48