example code for timeseries graphs