I 've got a webProject with dc.js (d3.js+crossfilter.js) and ndx.csv file. When i run project into chrome from visual studio, everythings is Ok. Now after build project and copy in other computers, Run that.
The problem is here. When i try to run webProject [html file] in other computers with Chrome, this browser has error "XMLHttpRequest cannot load file:///C:/Users/9901/Desktop/WebSite1/ndx.csv. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource." I search about this problem, but haven't found solution.
Hints:
If you're not married to Chrome, you can use Firefox. It works by default.
I had a similar issue before and I resolved it with an easy approach. You can't get data from .csv file because host and protocol are different.
To fix this issue, you should run a simple web server. The following example would work.
npm install -g http-server
http-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With