Add support for auto-refresh.

Not finished yet. Right now the data will be shown, the be x axis is not updated.