0

I have made a webpage with d3.js to create a bar chart. it runs on Firefox but not on Chrome.

This is the error I get

d3.min.js:1 XMLHttpRequest cannot load file:///Users/jayeshparekh/Desktop/project/story_fandom.tsv. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.Nt.i.send @ d3.min.js:1 d3.min.js:3 Uncaught TypeError: Cannot read property 'length' of null(…)

Please tell me what I can do to make it work on Chrome

mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • Read the error. You are using the `file` protocol and your page is not supported by Chrome unless the page lives on a web server or you specify `--allow-file-access-from-files` when starting Chrome – mplungjan Dec 01 '16 at 10:38
  • Duplicate of http://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local – mplungjan Dec 01 '16 at 10:40
  • i tried doing it, the webpage still isnt running my javascript. – khyati parekh Dec 01 '16 at 11:51
  • You tried doing what? Please give more information? – mplungjan Dec 01 '16 at 12:35

0 Answers0