export interface IFormatters { readonly yearFormat : string ; readonly quarterFormat : string ; readonly monthFormat : string ; readonly weekFormat : string ; readonly dayFormat : string ; readonly hourFormat : string ; readonly minuteFormat : string ; readonly secondFormat : string ; readonly milliSecondFormat : string ; } export const defaultFormatters = { yearFormat : "%Y" , quarterFormat : "%b" , monthFormat : "%b" , weekFormat : "%e" , dayFormat : "%e" , hourFormat : "%H:%M" , minuteFormat : "%H:%M" , secondFormat : "%H:%M:%S" , milliSecondFormat : ".%L" , } ; export const levelDefinition = [ ( d , date , i ) => d . startOfYear && date . getFullYear ( ) % 12 === 0 && "yearFormat" , ( d , date , i ) => d . startOfYear && date . getFullYear ( ) % 4 === 0 && "yearFormat" , ( d , date , i ) => d . startOfYear && date . getFullYear ( ) % 2 === 0 && "yearFormat" , ( d , date , i ) => d . startOfYear && "yearFormat" , ( d , date , i ) => d . startOfQuarter && "quarterFormat" , ( d , date , i ) => d . startOfMonth && "monthFormat" , ( d , date , i ) => d . startOfWeek && "weekFormat" , ( d , date , i ) => d . startOfDay && i % 2 === 0 && "dayFormat" , ( d , date , i ) => d . startOfDay && "dayFormat" , ( d , date , i ) => d . startOfHalfDay && "hourFormat" , ( d , date , i ) => d . startOfQuarterDay && "hourFormat" , ( d , date , i ) => d . startOfEighthOfADay && "hourFormat" , ( d , date , i ) => d . startOfHour && date . getHours ( ) % 2 === 0 && "hourFormat" , ( d , date , i ) => d . startOfHour && "hourFormat" , ( d , date , i ) => d . startOf30Minutes && "minuteFormat" , ( d , date , i ) => d . startOf15Minutes && "minuteFormat" , ( d , date , i ) => d . startOf5Minutes && "minuteFormat" , ( d , date , i ) => d . startOfMinute && "minuteFormat" , ( d , date , i ) => d . startOf30Seconds && "secondFormat" , ( d , date , i ) => d . startOf15Seconds && "secondFormat" , ( d , date , i ) => d . startOf5Seconds && "secondFormat" , ( d , date , i ) => d . startOfSecond && "secondFormat" , ( d , date , i ) => "milliSecondFormat" , ] ;