Line | |
---|
1 | using System;
|
---|
2 | using Microsoft.Research.DynamicDataDisplay;
|
---|
3 | using System.Windows;
|
---|
4 | using Microsoft.Research.DynamicDataDisplay.Navigation;
|
---|
5 | using Microsoft.Research.DynamicDataDisplay.Common;
|
---|
6 | using System.Windows.Controls;
|
---|
7 | using Microsoft.Research.DynamicDataDisplay.Charts;
|
---|
8 |
|
---|
9 |
|
---|
10 | namespace Microsoft.Research.DynamicDataDisplay
|
---|
11 | {
|
---|
12 | public class TimeChartPlotter : ChartPlotter
|
---|
13 | {
|
---|
14 | public TimeChartPlotter()
|
---|
15 | {
|
---|
16 | MainHorizontalAxis = new HorizontalDateTimeAxis();
|
---|
17 | }
|
---|
18 |
|
---|
19 | public void SetHorizontalAxisMapping(Func<double, DateTime> fromDouble, Func<DateTime, double> toDouble)
|
---|
20 | {
|
---|
21 | if (fromDouble == null)
|
---|
22 | throw new ArgumentNullException("fromDouble");
|
---|
23 | if (toDouble == null)
|
---|
24 | throw new ArgumentNullException("toDouble");
|
---|
25 |
|
---|
26 |
|
---|
27 | HorizontalDateTimeAxis axis = (HorizontalDateTimeAxis)MainHorizontalAxis;
|
---|
28 | axis.ConvertFromDouble = fromDouble;
|
---|
29 | axis.ConvertToDouble = toDouble;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public void SetHorizontalAxisMapping(double min, DateTime minDate, double max, DateTime maxDate) {
|
---|
33 | HorizontalDateTimeAxis axis = (HorizontalDateTimeAxis)MainHorizontalAxis;
|
---|
34 |
|
---|
35 | axis.SetConversion(min, minDate, max, maxDate);
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.