changing the where clauses and chart calls to allow for a rolling window of time, rather than always charting the current day