Пример #1
0
        /// <summary>
        /// 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.
        /// </summary>
        /// <param name="min">The minimal viewport value.</param>
        /// <param name="minValue">The value of axis type, corresponding to minimal viewport value.</param>
        /// <param name="max">The maximal viewport value.</param>
        /// <param name="maxValue">The value of axis type, corresponding to maximal viewport value.</param>
        public override void SetConversion(double min, TimeSpan minValue, double max, TimeSpan maxValue)
        {
            var conversion = new TimeSpanToDoubleConversion(min, minValue, max, maxValue);

            ConvertToDouble   = conversion.ToDouble;
            ConvertFromDouble = conversion.FromDouble;
        }
        public void SetConversion(double min, TimeSpan minSpan, double max, TimeSpan maxSpan)
        {
            var conversion = new TimeSpanToDoubleConversion(min, minSpan, max, maxSpan);

            ConvertToDouble   = conversion.ToDouble;
            ConvertFromDouble = conversion.FromDouble;
        }