In doing some work with data and date ranges, Leonid Mamchenkov came across something strange about the "weeks" that the date and time functions in PHP work on.
Sometimes, there's not always 52 weeks in a year.
With code as simple and straight-forward as [our example], you'd probably look for the problem elsewhere.
Maybe it's your statistical data which is wrong, or the graph is not generated properly. But the problem is here.