score:1

The object returned by queue() in queue.js doesn't have the methods "progress" and "error". Here is a link to the source code: https://github.com/mbostock/queue/blob/master/queue.js.

As queue.js takes an xhr object and uses 'apply' to execute the function, the following workaround worked for me. It involves using the get() method of an xhr object to execute the function.

Sample code:

queue().defer(d3.json("file1.json")
                 .on("progress", function({console.log(d3.event.loaded);})                                               
                 .get, /*First argument*/ "error")
       .await(function (error, file1_data) {console.log(file1_data);});

Hope this helps.


Related Query

More Query from same tag