pass file path to .defer d3

589 Views Asked by At

I am entirely new to d3.js so please excuse me if I wrote anything wrong. In index.html, I have the code as below:

var start = function(){

           queue()
                   .defer(d3.json, "data.json")
                   .defer(d3.json, "mdata.json")
                   .await(dataLoaded);

       }

I get the output as excepted when data.json and mdata.json reside in the same directory as index.html but if they are in different directory I am not getting the required output even after passing the file path. I am on windows 7 please help me to pass correct file path (Suppose if my path starts with C:\Users\sp123\DataDir\data.json)?

0

There are 0 best solutions below