AxisRange.CalculateMaxValue exception

2 posts, 0 answers
  1. Alex
    Alex avatar
    13 posts
    Member since:
    Jun 2011

    Posted 10 Jan 2012 Link to this post

    Original code:
    protected virtual double CalculateMaxValue()
        double maxValue = this.ActualMinValue;
        while ((decimal)maxValue < (decimal)this.SeriesMaxValue)
            maxValue += this.ActualStep;
        return maxValue;

    If we have maxValue or SeriesMaxValue not in the decimal type range then we have an exception
    "Value was either too large or too small for a Decimal.";

    System.OverflowException: Value was either too large or too small for a Decimal.
        в System.Decimal..ctor(Double value)
        в Telerik.Windows.Controls.Charting.AxisRange.CalculateMaxValue()
        в Telerik.Windows.Controls.Charting.AxisRange.UpdateRange()
        в Telerik.Windows.Controls.Charting.AxisRangeY.UpdateRange()
        в Telerik.Windows.Controls.Charting.AxisY.InitializeAxisValuesForAutoRange()
        в Telerik.Windows.Controls.Charting.Axis.BuildAxisData()
        в Telerik.Windows.Controls.Charting.AxisY.BuildAxisData()
        в Telerik.Windows.Controls.Charting.Axis2D`1.UpdateAxisData(Axis axis, Size newSize)
        в Telerik.Windows.Controls.Charting.Axis2D`1.AxisSizeChanged(Object sender, SizeChangedEventArgs e)
        в System.Windows.SizeChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
        в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
        в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
        в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
        в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
        в System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
        в System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        в System.Windows.ContextLayoutManager.fireSizeChangedEvents()
        в System.Windows.ContextLayoutManager.UpdateLayout()
        в System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
        в System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
        в System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
        в System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
        в System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
        в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
        в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    WPF 4.0
    Telerik 2011.3.1116
  2. Yavor
    Yavor avatar
    401 posts

    Posted 13 Jan 2012 Link to this post

    Hello Alex,

    Currently RadChart can process data that is in the range of decimal. This is done to improve precision, as arithmetic operations done in decimal are more precise than those done in double. Our developers investigated this limitation and concluded that more serious changes have to be made to the control internal mechanisms. These changes can reduce the precision when working with small numbers. So, I am afraid these changes have been dropped of our schedule and currently their status is undefined. We will reconsider them again when discussing our plans for the next quarter.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top