A simple line graph that updates in realtime. In this case, it is showing the millisecond value generated by Javascript every 100ms, over the course of 12 seconds.
Notes:
if you leave this tab for a second and come back, you can see that window.setTimeout
slows down. D3 is simply connecting points, so when the data becomes sparse, you get unexpected patterns.
You may also notice that the points never hit the X-axis: again, points are only generated every 100ms, so unless you load this script at exactly 000ms, D3 will never see a 0ms value. Limitations of data…