Displaying a Weekly Max moving average line graph

Have a look at this thread, and see if it might help. The script can get activities and return a value for the defined period.