PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 2ms 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
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5
 6namespace Microsoft.Research.DynamicDataDisplay.Charts
 7{
 8	public class TimeSpanAxisControl : AxisControl<TimeSpan>
 9	{
10		public TimeSpanAxisControl()
11		{
12			LabelProvider = new TimeSpanLabelProvider();
13			TicksProvider = new TimeSpanTicksProvider();
14
15			ConvertToDouble = time => time.Ticks;
16			ConvertFromDouble = ticks => new TimeSpan((long)ticks);
17
18			Range = new Range<TimeSpan>(new TimeSpan(), new TimeSpan(1, 0, 0));
19		}
20	}
21}