How to make D3.js script work on all Browsers

In order to D3.js file work with all browsers you need a simple web-server. You  easily can create a web-server with python using the following instruction on any powershell.

for python 3.X


python -m http.server 8000 --bind 127.0.0.1

for python 2.7

 
python -m SimpleHTTPServer 8000 --bind 127.0.0.1 

NB: Make sur you have python installed on you computer and check yout version using the commande : python –version.

Then go to your root directory, which sould be:  C:\Users\YOUR_USER_NAME\ for Windows and /home/YOUR_USER_NAME/  for Linux and put your html/d3.js script on it.

let’s now open your file on your favorite browser by writing: 127.0.0.1:8000/your_file_name.