alphagov/spotlight — pull request #311 by annapowellsmith (2014-03-25 14:51:40+00:00)
Title: Allow pinning to start or end date

Pivotal story: https://www.pivotaltracker.com/s/projects/911874/stories/63604218

It's now possible to "pin" the start and/or end date of a chart when querying Backdrop. If only one of these options is set, we use the following logic:
* If only the start date is pinned, we set the end date to now.
* if only the end date is pinned, we set the start date to the default duration for the graph period. (For example, if the period is "week", the start date is set to 9 weeks before the pinned end date.)

I've extended the grouped_timeseries, completion_numbers, and completion_rate modules to allow these options out of the box. Set "start-at" and "end-at" parameters in the stubs to use this option.

I haven't extended any other modules for now because I can't really see this option being useful in other chart types: however, it will be easy to extend other modules and I am happy to add them to this pull request if wished.