Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Media;
|
---|
6 | using Microsoft.Research.DynamicDataDisplay.Charts.Axes.Numeric;
|
---|
7 |
|
---|
8 | namespace Microsoft.Research.DynamicDataDisplay.Charts
|
---|
9 | {
|
---|
10 | /// <summary>
|
---|
11 | /// Represents a numeric axis with values of <see cref="System.Double"/> type.
|
---|
12 | /// </summary>
|
---|
13 | public class NumericAxis : AxisBase<double>
|
---|
14 | {
|
---|
15 | /// <summary>
|
---|
16 | /// Initializes a new instance of the <see cref="NumericAxis"/> class.
|
---|
17 | /// </summary>
|
---|
18 | public NumericAxis()
|
---|
19 | : base(new NumericAxisControl(),
|
---|
20 | d => d,
|
---|
21 | d => d)
|
---|
22 | {
|
---|
23 | }
|
---|
24 |
|
---|
25 | /// <summary>
|
---|
26 | /// Sets conversions of axis - functions used to convert values of axis type to and from double values of viewport.
|
---|
27 | /// Sets both ConvertToDouble and ConvertFromDouble properties.
|
---|
28 | /// </summary>
|
---|
29 | /// <param name="min">The minimal viewport value.</param>
|
---|
30 | /// <param name="minValue">The value of axis type, corresponding to minimal viewport value.</param>
|
---|
31 | /// <param name="max">The maximal viewport value.</param>
|
---|
32 | /// <param name="maxValue">The value of axis type, corresponding to maximal viewport value.</param>
|
---|
33 | public override void SetConversion(double min, double minValue, double max, double maxValue)
|
---|
34 | {
|
---|
35 | var conversion = new NumericConversion(min, minValue, max, maxValue);
|
---|
36 |
|
---|
37 | this.ConvertFromDouble = conversion.FromDouble;
|
---|
38 | this.ConvertToDouble = conversion.ToDouble;
|
---|
39 | }
|
---|
40 | }
|
---|
41 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.