Bugfixes to graphs

Fixed a part of the code still using the old WEEK_OF_YEAR.