using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using Microsoft.Research.DynamicDataDisplay.Charts.Axes.Numeric;
namespace Microsoft.Research.DynamicDataDisplay.Charts
{
///
/// Represents a numeric axis with values of type.
///
public class NumericAxis : AxisBase
{
///
/// Initializes a new instance of the class.
///
public NumericAxis()
: base(new NumericAxisControl(),
d => d,
d => d)
{
}
///
/// Sets conversions of axis - functions used to convert values of axis type to and from double values of viewport.
/// Sets both ConvertToDouble and ConvertFromDouble properties.
///
/// The minimal viewport value.
/// The value of axis type, corresponding to minimal viewport value.
/// The maximal viewport value.
/// The value of axis type, corresponding to maximal viewport value.
public override void SetConversion(double min, double minValue, double max, double maxValue)
{
var conversion = new NumericConversion(min, minValue, max, maxValue);
this.ConvertFromDouble = conversion.FromDouble;
this.ConvertToDouble = conversion.ToDouble;
}
}
}