/// <summary> /// Initializes a new instance of the <see cref="DateTimeAxisControl"/> class. /// </summary> public DateTimeAxisControl() { LabelProvider = new DateTimeLabelProvider(); TicksProvider = new DateTimeTicksProvider(); MajorLabelProvider = new MajorDateTimeLabelProvider(); ConvertToDouble = dt => dt.Ticks; Range = new Range <DateTime>(DateTime.Now, DateTime.Now.AddYears(1)); }
/// <summary> /// Initializes a new instance of the <see cref="DateTimeAxisControl"/> class. /// </summary> public DateTimeAxisControl() { LabelProvider = new DateTimeLabelProvider(); TicksProvider = new DateTimeTicksProvider(); MajorLabelProvider = new MajorDateTimeLabelProvider(); ConvertToDouble = dt => dt.Ticks; ConvertFromDouble = d => { if (d < 0) { d = 0; } return(new DateTime((long)d)); }; Range = new Range <DateTime>(DateTime.Now, DateTime.Now.AddYears(1)); }