using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Microsoft.Research.DynamicDataDisplay.Charts { /// /// AxisControl for DateTime axes. /// public class DateTimeAxisControl : AxisControl { /// /// Initializes a new instance of the class. /// 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.Now, DateTime.Now.AddYears(1)); } } }