Questions tagged [queue.js]

Asynchronous helper library for JavaScript.

Queue.js is an asynchronous helper library for JavaScript that allows to fine-tune the parallelism of the execution. See its website for more information. Also look at this for a quick look.

Queue.js is a plugin that loads external files into the script and ensures each file is completely loaded before allowing the script to continue running.

27 questions
1
vote
0 answers

Queue error "Uncaught TypeError: Cannot read property 'objects' of null"

I'm trying to using queues to ensure my files are loaded fully before the script continues. However, when I load in my json map files and try to use them in a function, I get an error. var counties = svg.append("g") .attr("id", "counties") …
kthieu
  • 187
  • 2
  • 17
1
vote
1 answer

d3.js d3.xhr(rpcUrl).post appears to be failing to pass json data object

Background: I'm attempting to use d3 to create a choropleth as demonstrated here: http://bl.ocks.org/mbostock/4060606 My data is coming from a json-rpc api. var rpcUrl = "http://localhost:3001/rpc/json"; var rpcData = '{"params": {}, "jsonrpc":…
lysdexia
  • 1,786
  • 18
  • 29
1
vote
0 answers

Why does my D3/topojson SVG not render with queue.js?

I am attempting to create a world map with D3.js and have multiple CSV files load separately via queue.js. However, I am unable to render the json geometries, let alone able to attach CSV values to the path id. Without the queue.js method, the SVG…
0
votes
2 answers

Uncaught Reference Error: queue is not defined

I am getting the error Uncaught Reference Error: queue is not defined but I do not understand why I am getting the error. I am trying to draw a map of the USA using D3 and I am/was using this guide but it does not exactly match with the most…
Martin Green
  • 27
  • 1
  • 2
  • 6
0
votes
0 answers

Uncaught TypeError: Cannot read property 'forEach' of undefined from d3/dc

queue() .defer(d3.json, "/uganda/report") .defer(d3.json, "static/geojson/uganda_districts.json") .await(makeGraphs); function makeGraphs(error, reportJson,districtsJson){ //Clean reportJson data var ugandaReport = reportJson; var…
0
votes
1 answer

send query string via queue.defer

How do I send data (query string) using the queue defer methods? Currently I use d3.json to get a static file as below. queue() .defer(d3.json, "js/file1.json") .defer(d3.xhr, 'js/file2.json') .await(callback) now, I need to also 'GET'…
Michele
  • 8,563
  • 6
  • 45
  • 72
0
votes
1 answer

making setTimeout work with queue.js

I am attempting to execute a chunk of code that is resource intensive to the point it locks the browser while executing. As a workaround, I am trying to use mbostock's queue.js library in conjunction with setTimeout to rate-limit the execution such…
mlehmeher
  • 197
  • 2
  • 9
0
votes
0 answers

pass file path to .defer d3

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,…
sp123
  • 45
  • 10
0
votes
0 answers

How to interact with a (variable name unknown) javascript object in a dynamically loaded file

Mike Bostock's queue.js library currently allows me to load a variable number and type of files (css, json, js etc) into a nascent single page browser application: d3.json("files_to_load.json", function(data) { var q = queue(1); …
user1019696
  • 453
  • 1
  • 5
  • 15
0
votes
0 answers

load non-local or external json/csv/data-files with d3.js / queue.js

I have a problem regarding loading data files from an external server with d3, queue.js respectively. Basically what I want to do is to have my d3 graphs on multiple webservers, but the underlying data should be maintained centralized on a single…
Benjamin Maier
  • 522
  • 6
  • 14
0
votes
1 answer

Queue.js: Can you access the number of items in a queue()?

I am processing many files through a queue() using defer(). I am wondering if from within one of my defer processes I an access the number of items in the queue? I did not see any accessors that would give me this, although the source of queue.js…
Brian Feeny
  • 441
  • 4
  • 14
0
votes
1 answer

Queue asynchronous operation which involves promises

I need to use a queue to serialize my async requests. Looking around, I've found a small library by Mike Bostock here. But I am a bit confused as tp how to use it along with promise object. So, I have tons of reqs coming from the user interface.…
bsr
  • 57,282
  • 86
  • 216
  • 316
1
2