Set timeformat for flot x-axis based on granularity selected