Drawing multiple lines with D3.js

After a great deal of frustration and much trial and error I have finally managed to get D3.js to plot multiple lines, and when the data changes the lines are updated, complete with transitions.

Head over to http://brew-pi.dack.com.au/temps/d3 to see the code behind the example below.