PageRenderTime 41ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/src/DynamicDataDisplay/Charts/Axes/TimeSpan/TimeSpanAxisControl.cs

#
C# | 21 lines | 18 code | 3 blank | 0 comment | 0 complexity | 3c5aa6f22d9e5b7188df3f6d0ae39795 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Microsoft.Research.DynamicDataDisplay.Charts
  6. {
  7. public class TimeSpanAxisControl : AxisControl<TimeSpan>
  8. {
  9. public TimeSpanAxisControl()
  10. {
  11. LabelProvider = new TimeSpanLabelProvider();
  12. TicksProvider = new TimeSpanTicksProvider();
  13. ConvertToDouble = time => time.Ticks;
  14. ConvertFromDouble = ticks => new TimeSpan((long)ticks);
  15. Range = new Range<TimeSpan>(new TimeSpan(), new TimeSpan(1, 0, 0));
  16. }
  17. }
  18. }