Javascript time series plotting recipe using Flot and socket.io