changing graph based on time