I would like to create charts similar to Google Analytics which allow you to aggregate data by day, week, month...
As an example, the following chart data displays daily data for a month:

And by clicking 'Week', the chart aggregates the data points into weeks:

The closest I can find is the Ruby library Timeslicer, https://github.com/Trimeego/timeslicer . Is there something similar in Javascript or a Flot plugin out there?