Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Axes/Numeric/NumericAxis.cs @ 13398

Last change on this file since 13398 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Media;
6using Microsoft.Research.DynamicDataDisplay.Charts.Axes.Numeric;
7
8namespace 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.