Preset time interval in custom widget

Preset time interval in custom widget

Is there a way to set preset time interval in custom widget?

I have a customer that require a inverted chart, so I created a custom widget, but the preset time interval, most specifically, the calendar header button to choose a time period, is something that the customer require too.
How to make this?

Some changes that would be welcome:
 - A option to inverted the chart in chart type widgets;
 - Preset time interval in custom widget, and the initial period like in chart type widgets (Why dont have this?).