View on bl.ocks.org/cmdoptesc/e9b3bfc6f43b4bd237e2
Forked from Bostock's original Progress Events example to answer Rex X's post on the d3-js group:
The progress meter is based on the number of files that have downloaded. In our case, numberOfFiles
is set to 20.
We then generate 20 random durations between 0 - 3000ms to simulate download times, and call setTimeout
using the durations. Each timer then calls update
, which increments the number of files downloaded, increasing the progress arc with a tweening function.